Skip to content

fix: access token refresh on web app#5681

Merged
boojack merged 1 commit intousememos:mainfrom
peteretelej:fix-token-refresh
Mar 5, 2026
Merged

fix: access token refresh on web app#5681
boojack merged 1 commit intousememos:mainfrom
peteretelej:fix-token-refresh

Conversation

@peteretelej
Copy link
Copy Markdown
Contributor

@peteretelej peteretelej commented Mar 4, 2026

A bug exists within the token refresh flow that invalidates active browser sessions. Retrieving the active access token returns null if it's expired. Seem like a small oversight when token storage was migrated to the jwt tokens.

This means expired tokens don't refresh, and if leave the browser tab idle for 15min, the tab drops auth context and shows logged out view (you're still logged in though - reload fixes it). A few issues are open for this.

Resolves #5658, #5607, #5589, #5565
(last 3 are closed but underlying issue persisted)

May also fix some of the other issues where drafts keep getting lost (but I'm not sure, may be that the reauth is what makes the draft get lost)

A bug exists within the token refresh flow that invalidates active
browser sessions. Retrieving the active access token returns `null` if
it's expired. Seem like a small oversight when token storage was
migrated to the jwt tokens.

This means expired tokens don't refresh, and if leave the browser tab
idle for 15min, you get logged out. A few issues are open for this.

Resolves usememos#5658, usememos#5607, usememos#5589, usememos#5565

May also fix some of the other issues where drafts keep getting lost
(but I'm not sure, may be that the reauth is what makes the draft get
lost)
Copy link
Copy Markdown
Member

@boojack boojack left a comment

Choose a reason for hiding this comment

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

LGTM, good catch

@boojack boojack merged commit 3010f10 into usememos:main Mar 5, 2026
2 checks passed
@peteretelej peteretelej deleted the fix-token-refresh branch March 5, 2026 11:52
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.

Notes disappearing when returning to homepage

2 participants