Refresh auth session with server-authoritative current user data#59
Merged
Conversation
Agent-Logs-Url: https://github.com/RMCampos/tasknote/sessions/3f01367a-baee-4bbe-8f66-f04da58d485f Co-authored-by: RMCampos <2219519+RMCampos@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix user data update after refreshing session
Refresh auth session with server-authoritative current user data
May 18, 2026
RMCampos
approved these changes
May 19, 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.
Refreshing a session previously rotated only the JWT, leaving
AuthContext.userstale until re-login. This change makes refresh also rehydrate current user profile data so cross-device/profile updates are reflected after page reload/session refresh.Backend: add authenticated current-user endpoint
GET /rest/users/meinUserController.AuthService#getCurrentUserResponse()to return the logged-in user asUserResponse(including gravatar hash logic used elsewhere).Frontend: refresh now updates token and user context
ApiConfig.currentUserUrl(/rest/users/me).AuthProvider.checkCurrentAuthUser()to:/rest/user-sessions/refresh/rest/users/meUSER_DATAand update in-memory context.Focused test updates
UserControllerTestwith authorized/unauthorized coverage forGET /rest/users/me.AuthProvidertests to mock refresh + current-user fetch sequence and assert user/localStorage refresh behavior.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
checkstyle.org/opt/hostedtoolcache/CodeQL/2.25.1/x64/codeql/tools/linux64/java/bin/java /opt/hostedtoolcache/CodeQL/2.25.1/x64/codeql/tools/linux64/java/bin/java -jar /opt/hostedtoolcache/CodeQL/2.25.1/x64/codeql/xml/tools/xml-extractor.jar --fileList=/tmp/codeql-scratch-8020627fcb755699/dbs/java/working/files-to-index14157248185019752309.list --sourceArchiveDir=/tmp/codeql-scratch-8020627fcb755699/dbs/java/src --outputDir=/tmp/codeql-scratch-8020627fcb755699/dbs/java/trap/java efresh-user-data it(dns block)download.cypress.io/usr/local/bin/node node dist/index.js --exec install(dns block)If you need me to access, download, or install something from one of these locations, you can either: