SSO related #43

Merged
YousifShkara merged 3 commits from feat/mfa-spa into main 2026-05-22 12:03:15 +02:00
Owner
No description provided.
Background refresh loop now calls a new refresh_user_from_me() helper after every successful token rotation. Pulls /v1/auth/me, updates the cached CurrentUser fields (role, name, email, timezone, avatar) from server state, and clears memberships so the loader effect re-fetches them.

Mokosh is RFC-compliant and typically omits id_token on refresh-grant responses (OIDC Core 12.2), so the cached id_token's claims would otherwise stay stale for the life of the session - a user demoted server-side would keep their old role visible (and bypassed) until full re-login.

Failures are silent: the cached user stays in place rather than bouncing the user to /login on transient /v1/auth/me errors.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Merge remote-tracking branch 'origin/main' into feat/mfa-spa
Some checks failed
Check / clippy + fmt + tests (pull_request) Failing after 8s
834bb5d1b6
Merge remote-tracking branch 'origin/main' into feat/mfa-spa
All checks were successful
Check / clippy + fmt + tests (pull_request) Successful in 1m34s
Create release / Create release from merged PR (pull_request) Has been skipped
285f0bdd3a
# Conflicts:
#	src/pages/contacts.rs
YousifShkara deleted branch feat/mfa-spa 2026-05-22 12:03:15 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/mokosh-apps!43
No description provided.