Skip to content

fix: subscription socket auth#89

Merged
Theauxm merged 2 commits into
mainfrom
fix/subscription-socket-auth
Jul 6, 2026
Merged

fix: subscription socket auth#89
Theauxm merged 2 commits into
mainfrom
fix/subscription-socket-auth

Conversation

@Theauxm

@Theauxm Theauxm commented Jul 6, 2026

Copy link
Copy Markdown
Member

No description provided.

Theauxm added 2 commits July 6, 2026 14:28
The GameServer API registers two JWT issuers ("player" and "partner", symmetric HS256 so the sample runs with no external identity provider) and wires AddTraxJwtDispatcher, so GraphQL subscriptions authenticate over the WebSocket by routing the connection_init token to a scheme by its iss claim. A Development-only GET /dev/token/{player|partner} endpoint mints a token to try, and Google id-tokens become a third dispatched issuer when Google:ClientId is set.

The E2E subscription tests now connect with player- and partner-issuer tokens (proving both issuers dispatch over WS) plus an unroutable token that is rejected. The test WebSocket client gained an authToken option alongside apiKey.
The GameServer sample's subscription auth demo relies on the dispatcher-aware socket interceptor shipped in Trax.Api 1.38.1. Bump the Trax.Api.* pins from 1.38.0 and regenerate the sample lockfiles so CI restores the released packages that contain the fix.
@Theauxm
Theauxm merged commit 2ffaa3a into main Jul 6, 2026
2 checks passed
@Theauxm
Theauxm deleted the fix/subscription-socket-auth branch July 6, 2026 21:40
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown

This PR is included in version 1.29.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant