fix: account page reauth UX, narrow-screen overflow, signout cleanup - #989
Merged
nimish-ks merged 9 commits intoAug 27, 2026
Merged
Conversation
rohan-chaturvedi
approved these changes
Aug 27, 2026
… useReauthGuard consolidation
rohan-chaturvedi
force-pushed
the
feat--user-auth-management-misc-fixes-improv
branch
from
August 27, 2026 10:35
9e67116 to
95d9a01
Compare
nimish-ks
added a commit
that referenced
this pull request
Aug 29, 2026
…e management (#983) * feat: user account management — auth provider linking, TOTP 2FA, email change, and account deletion * fix: keep TOTP verify button disabled through post-verify redirect, simplify setup copy * fix: add TOTP manage dialog, button icons, hover-reveal unlink and clearer copy on account page * fix: gate email-change password proof on has_usable_password instead of session auth method * fix: allow soft-deleting service account tokens whose creator account was deleted * feat: show deleted-account actors consistently in audit logs and token lists * fix: keep App-level service tokens usable after their creator account is deleted * fix: harden post-login redirect validation and make re-login session freshness TOTP-aware * refactor: drop redundant sole-SA-handler warning from deletion readiness — a sole handler is only possible as sole owner, which already blocks * fix: split user menu into account, org and session sections and autofocus 2FA code inputs * fix: tolerate fast TOTP clocks in the replay guard, lock the user row during the email-change ceremony, reject blank display names and refresh cached org data after account changes * fix: size user menu settings buttons to their content instead of full width * feat: group account sign-in methods by organisation and label org-level linked identities * fix: show the account name and an org icon in the unlink dialog and sign-in method cards * refactor: move identity and MFA management from REST to GraphQL, keeping only pre-login TOTP verify on REST * fix: show a single owned toast per account-page error and never surface the raw reauth code * fix: size the TOTP verify button to its content instead of full width * fix: harden account-management flows from pre-ship review (SSO uid guard, deletion races, SCIM/TOTP, shared helpers) * fix: scope reauth sign-in options to linked methods and centralize reauth error handling * feat: move manage account button below the user context * feat: 2fa icon * feat: improve account recovery note clarity * feat: add a icon to change password button * feat: offer the same SSO providers on the account page as the login page * fix: skip no-op display name saves on the account page * feat: restore interrupted account flows after re-auth with a confirm-first prompt * feat: link user menu profile and org cards to account and org settings * feat: give the warning text some more room. increased padding * feat: improve padding of the icons nin the social and 2fa sections * feat: improve confirm it's you UX * feat: reanme the account management subtitle * fix: the App setting tab's UI and padding * feat: rename to account & srcurity * feat: simplify personal account management description * feat: "use a recovery code - instead" * feat: gate the user on session reauth before taking sensitive action for simplicity * feat: remove the annoying signin to continue toast * feat: improve the confirm it's you message * fix-ui: uuid text overflow on narrower width * feat: send the user to account settings instead of home * fix-ui: test overflow on narrower screens * fix: preemptively gate the account delete * fix: stop the graphql client after user logout * fix: exempt invite acceptance from org SSO enforcement for invite holders * fix: review fixes for reauth UX — back-link label, signout hardening, useReauthGuard consolidation * fix: account page reauth UX, narrow-screen overflow, signout cleanup (#989) * feat: gate the user on session reauth before taking sensitive action for simplicity * feat: remove the annoying signin to continue toast * feat: improve the confirm it's you message * fix-ui: uuid text overflow on narrower width * feat: send the user to account settings instead of home * fix-ui: test overflow on narrower screens * fix: preemptively gate the account delete * fix: stop the graphql client after user logout * fix: review fixes for reauth UX — back-link label, signout hardening, useReauthGuard consolidation --------- Co-authored-by: rohan <rohan.chaturvedi@protonmail.com> * fix: keep onboarding navbar below dialog overlays * fix: validate OIDC issuer at config save and surface authorize errors as safe redirect codes * fix: map SSO error codes to friendly copy on the login page --------- Co-authored-by: Nimish <85357445+nimish-ks@users.noreply.github.com> Co-authored-by: Nimish <nimish@phase.dev>
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.
🔍 Overview
Stacked on top of #983 — base branch is
feat--user-auth-management, so review that first. This is follow-up UX polish from testing the account page locally.Frontend only. No backend, schema, migration, or dependency changes.
💡 Proposed Changes
Prompt-first re-authentication
Reauth-gated dialogs used to open with a "You'll be asked to confirm it's you before this change is applied" notice inside them, and the sign-in prompt only appeared at submit. The freshness check now runs at click time instead, so the "Confirm it's you" prompt comes first and the user continues the flow normally after re-login.
StaleSessionNotice.tsx— the prompt now does its jobrequiresReauthbutton swap ("Sign in again to continue" vs "Delete account"). That flag is a load-time snapshot, so a session going stale while the page sat open still rendered the delete button and dead-ended at submit; the click-timeisFresh()check catches that caserequire_fresh_session_graphqlon the mutations is still the actual enforcement. This only moves when the user is askedLogin page reauth banner
?reauth=1banner from a low-contrast cyanAlertone-liner into an amber panel with a "Confirm it's you" heading, reusing the icon and tokens from the dialog the user just came fromNarrow-screen fixes
min-w-0on the flex child so it can shrink, plusbreak-all)shrink-0)Navigation
activeOrganisation.namerather than a hardcoded slug, falling back to/when there's no active orgSignout cleanup
graphQlClient.stop()at the top ofhandleSignout(), stopping polling and in-flight queries before the logout round trip. Without it,GetOrganisations(10s poll) can fire against an already-invalidated session and 403 — visible after account deletion. Nothing user-facing was broken (Django's HTML 403 lands in Apollo'snetworkErrorbranch, which doesn't toast), but it removes the log noise and a redundant second logout call📝 Release Notes
🎯 Reviewer Focus
DeleteAccountSection.tsx— therequiresReauthremoval is the only change with a server-side counterpart. The mutation gate is untouched; this is purely about when the UI asks.apollo/client.ts— one line, but it's shared plumbing on every signout path (manual logout, session expiry, deletion).🧪 Testing
Manual only; no test changes. Verified against the local dev stack in cloud mode — each of the five gated flows (email change, 2FA setup, 2FA manage, unlink, delete) shows the prompt on a stale session and restores correctly after re-login.