Skip to content

fix(csr): move websocket authentication to first frame - #448

Draft
nicklasl wants to merge 1 commit into
mainfrom
nicklasl/first-frame-auth
Draft

fix(csr): move websocket authentication to first frame#448
nicklasl wants to merge 1 commit into
mainfrom
nicklasl/first-frame-auth

Conversation

@nicklasl

@nicklasl nicklasl commented Sep 3, 2026

Copy link
Copy Markdown
Member

Summary

  • remove the session token from the WebSocket URL
  • authenticate with the first client frame and wait for a server acknowledgement before sending recording data
  • re-authenticate before flushing buffered data after reconnects
  • regenerate the embedded worker and update coverage

Protocol

Client authentication frame:

{"type":"authenticate","token":"<session token>"}

Server acknowledgement:

{"type":"authenticated"}

The compatible backend must be deployed before this SDK change. The backend implementation should continue accepting the legacy session_token query parameter during rollout.

Verification

  • yarn test:csr
  • yarn workspace @spotify-confidence/csr-common typecheck
  • yarn lint:csr
  • git diff --check

Co-Authored-By: Codex <noreply@openai.com>
@nicklasl nicklasl changed the title fix(csr): authenticate websocket with first frame fix(csr): move websocket authentication to first frame Sep 4, 2026
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