Repository navigation
Conversation
…et tokens The socket service now hands the SocketCluster client an in-memory auth engine that mints a short-lived socket token from the console session (POST int/v1/socket/token) for every handshake, so subscriptions queued before the handshake go out authenticated and existing callers need no change. Without a session, or when the server cannot mint tokens (404), the client connects anonymously as before. Tokens never touch localStorage or the URL. - refresh 60s before expiry via socket.authenticate() - on deauthenticate, or a kickOut/subscribeFail with a token reason, mint a fresh token, authenticate, and resubscribe the lost channels by name (restores delivery to raw instance().subscribe loops); retries are once per channel per token and capped per minute - re-key on login, session restore and organization switch; on logout clear the token, stop timers and disconnect - send query client=console/<version> - extension-author notes live in the PR (docs moved to fleetbase.io)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #98 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 168 168
Lines 5027 5229 +202
Branches 1362 1395 +33
==========================================
+ Hits 5027 5229 +202
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
feat(socket-auth): authenticate the realtime socket with session socket tokens
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release branch for v0.3.26, cut from
main.This branch collects #97: the console's
socketservice authenticates its SocketCluster connection with short-lived socket tokens and recovers from expiry and kick-outs. It connects anonymously, as before, when the server has socket authentication off.Related
Merging this tags
v0.3.26. The version comes from the branch name and is checked againstpackage.jsonand the first line ofRELEASE.md.