Repository navigation
fix: expire SSE connections with their auth token - #19
Conversation
|
Follow-up security fix is ready for review. The SSE stream now emits |
1 similar comment
|
Follow-up security fix is ready for review. The SSE stream now emits |
wjc2821296948
left a comment
There was a problem hiding this comment.
The connected-at-expiry path is handled, but an expired token can still leave EventSource reconnecting forever if the SSE connection drops before the token expires. Please cover that disconnected/reconnect case before merging.
wjc2821296948
left a comment
There was a problem hiding this comment.
The disconnect-before-expiry case is now addressed by the client-side expiry timer, but there is still a startup edge case with an already-expired stored token. Please stop connectEvents() after scheduleAuthExpiry() clears the token instead of creating a new EventSource with token=null.
|
I’ve updated the PR to address the disconnected-token reconnect loop. The client now schedules an independent expiry timer from the token payload, so it clears the expired token and returns to sign-in even if the SSE connection dropped before expiry and can no longer deliver |
|
I also addressed the startup edge case: |
Summary
auth-expiredSSE event and return the client to the sign-in screen instead of leaving EventSource reconnecting with an expired token.Validation
GitHub Actions will run the existing syntax checks and
npm test.