fix: access token refresh on web app#5681
Merged
boojack merged 1 commit intousememos:mainfrom Mar 5, 2026
Merged
Conversation
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)
peteretelej
commented
Mar 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A bug exists within the token refresh flow that invalidates active browser sessions. Retrieving the active access token returns
nullif 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)