Skip to content

Fix OAuth logout bug if started offline - #34918

Draft
dbkr wants to merge 4 commits into
developfrom
dbkr/oauth_refresh
Draft

Fix OAuth logout bug if started offline#34918
dbkr wants to merge 4 commits into
developfrom
dbkr/oauth_refresh

Conversation

@dbkr

@dbkr dbkr commented Sep 3, 2026

Copy link
Copy Markdown
Member

Updates to the js-sdk interface change such that fetching auth metadata and refreshing tokens is now up to the js-sdk with a callback to save the new tokens.

Previously we just tried once at startup to fetch auth metadata and powered through if the request failed, meaning we just didn't refresh the tokens, therefore causing the session to be logged out when the access token expired.

This leaves it up to the js-sdk to fetch auth metadata when it can, so we don't have to wait for it to be available before starting the client.

Fixes #34834

Checklist

Updates to the js-sdk interface change such that fetching auth metadata
and refreshing tokens is now up to the js-sdk with a callback to save
the new tokens.

Previously we just tried once at startup to fetch auth metadata and
powered through if the request failed, meaning we just didn't refresh
the tokens, therefore causing the session to be logged out when the access
token expired.

This leaves it up to the js-sdk to fetch auth metadata when it can, so we
don't have to wait for it to be available before starting the client.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Element is logged out if started when no server connection is available (and using OAuth)

1 participant