Skip to content

Fix reauthenticate prompt when local token has expired#790

Merged
garrettjstevens merged 1 commit into
mainfrom
773_login_expiry
May 19, 2026
Merged

Fix reauthenticate prompt when local token has expired#790
garrettjstevens merged 1 commit into
mainfrom
773_login_expiry

Conversation

@garrettjstevens
Copy link
Copy Markdown
Contributor

This change ensures that when the user's local token expires, it shows a prompt to reauthenticate. Previously this didn't usually work unless you refreshed the page, but now no page refresh is required.

Fixes #773

@garrettjstevens garrettjstevens self-assigned this May 12, 2026
const fetcher = superGetFetcher(loc)
return async (input: RequestInfo, init?: RequestInit) => {
const response = await fetcher(input, init)
if (response.status === 403) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to consider 401 as well ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the specific case of the token expiring our server returns 403, so we shouldn't need to worry about 401 here.

@garrettjstevens garrettjstevens merged commit ceac450 into main May 19, 2026
7 of 8 checks passed
@garrettjstevens garrettjstevens deleted the 773_login_expiry branch May 19, 2026 21:09
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.

Reauthenticate when user performs any operation when session is expired

2 participants