Skip to content

UI should reconnect the push feed socket when it renews its token, before the server closes it #38879

Backlog

Description

@Vamsi-klu

After #38876 (the fix for #38245) the server closes a push feed socket opened without a session at the first sweep after its token's exp, sending tokenExpiredChannel first. The UI then reconnects with its current token. That works, but each public client SSO tab drops its socket for up to one sweep interval (60 s by default) plus the reconnect backoff, about once per provider token lifetime, and anything pushed in that window is missed.

AuthCoordinator already renews the token about 60 s before exp. WebSocketProvider could listen for that renewal and reconnect the socket with the new token right away, so the server never has to close it.

Things to settle:

  • whether a renewal should reconnect every time or only when the socket was opened without a session (the UI does not know which today, so the server might need to say so in the handshake answer);
  • how to avoid a reconnect storm when many tabs renew at once.

Related: #38245, #38876, ADR "A push feed socket without a session ends when its token expires or its user is deleted".

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions