Repository navigation
Conversation
POST customers/socket-token with the customer's Customer-Token header,
resolving to { token, expires_in, expires_at } (SocketTokenResponse).
Declarations under types/ updated by hand; dist/ needs regenerating.
This was referenced Oct 6, 2026
feat(socket-auth): show channel authorization failures in the sockets viewer
fleetbase/dev-engine#51
Open
Open
This branch has not been deployed
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.
What
Customer#socketToken(params?, options?)callsPOST customers/socket-tokenwith the customer'sCustomer-Tokenheader (request-scoped, viaperformAuthorizedRequest) and resolves to{ token, expires_in, expires_at }.SocketTokenResponse.types/updated to match; public API snapshot gainsCustomer.socketToken.authEngine,socket.authenticate()refresh ~60 s before expiry, subscribing toorder.{id}, the checkoutsocket_token);docs/api-contract.mdlists the route.Why
Realtime channels are moving to authenticated subscriptions. Storefront customers need a token scoped to their own channels instead of subscribing anonymously.
Test plan
tests/actions.test.jscovers the endpoint, method, response and theCustomer-Tokenheader (existing loop asserts it on every authorized call); public API snapshot updated.dist/is generated output. It was not rebuilt locally; a follow-up commit on this branch regenerates it, otherwise the Require reproducible generated artifacts step will flag it.Related PRs
Part of the authenticated realtime channels rollout (socket auth), one PR per repo:
fleetbase/core-api ^1.6.69)fleetbase/fleetbase-socketserver, compose/helm/installer, console socket test page