Repository navigation
[M2.2e3a] Manage MFA proofs and temporary private grants - #68
Merged
Merged
Conversation
3 of 4 tasks
samuelmbabhazi
force-pushed
the
feat/m2.2e2c-account-screens
branch
from
November 5, 2026 12:39
38b3278 to
8631889
Compare
samuelmbabhazi
changed the base branch from
feat/m2.2e2c-account-screens
to
main
November 5, 2026 12:39
samuelmbabhazi
force-pushed
the
feat/m2.2e3a-mfa-form-state
branch
from
November 5, 2026 12:39
58c489f to
32421bb
Compare
samuelmbabhazi
added a commit
that referenced
this pull request
Nov 5, 2026
The account page now supports the complete MFA workflow: current status, manual authenticator enrollment, activation, recovery-code replacement and disable. It explains session/API-token invalidation before the user confirms a security change, shares the account mutation gate and focuses one common request-error summary. Setup keys and recovery codes can be copied only by an explicit click. Clipboard failures offer manual selection with fixed safe text. Provisioning URIs never become links. Code acknowledgement removes the displayed grant, and the private lifetime controls from #68 remain in force. Sign-out does not show a false “Signing out” state during an MFA operation. Validation: all 41 Angular tests pass; web lint, typecheck and production build pass. New tests exercise the rendered enrollment/activation/copy/acknowledgement flow and denied/late clipboard responses. Initial production payload remains below the warning budget (343 kB raw / 90 kB estimated transfer). No new dependency. The first commit only enables Angular-aware template formatting; the second contains the functional change. Stacked on #68. This PR stays draft until real-browser acceptance and the final desktop/mobile accessibility/design review in M2.2e4. No merge requested. - [x] MFA screens and explicit clipboard behavior - [x] Web checks and regression tests - [x] Plan/spec updated - [ ] Real-browser and final design/accessibility review (M2.2e4)
5 of 6 tasks
samuelmbabhazi
added a commit
that referenced
this pull request
Nov 5, 2026
…rets on a timer (#98) ## Task Review follow-up for #64, #66 and #68 (M2.2e1b, M2.2e2b, M2.2e3a). Refs #21 ## What changed **Session state (`session-store.ts`)** - Sign-out on an expired or revoked session: the server answers 401, which now clears the local session instead of keeping "Signed in as …" with an error that every retry repeats. - A successful login always updates the session, even if its form was left before the response arrived. The server has already set the session cookie, so the UI no longer claims the user is signed out while the next reload is authenticated. Form side effects (navigation) remain guarded by the mutation runner. - A login that fails while it superseded a pending session check re-runs the check, so the account page no longer stays on "Checking your session…" until reload. **One-time secrets (`mfa-form-store.ts`, `token-form-store.ts`)** - Recovery codes and newly created API tokens are no longer hidden by a fixed 10-minute timer. They stay until the user acknowledges them, leaves the page or rotates the session. - The provisioning seed keeps its timer, which follows the real server expiry. - Panel texts and SPEC updated. ## Why - The 401 sign-out trapped users in a signed-in UI until a full reload (#64). - The ignored login left a live server session invisible to the user (#66). - The server shows recovery codes and API tokens exactly once. Hiding them after 10 minutes, with no warning or extension, fails WCAG 2.2.1 (Timing Adjustable, level A) on a core flow. A slow or screen-reader user copying ten 32-character codes could lose them and then need a TOTP code to regenerate them (#68). ## How it was tested - New and updated unit tests: 401 sign-out clears the session; a failed login that superseded a pending check settles the state; recovery codes and API tokens are still displayed after an hour without acknowledgement. - `nx run-many -t lint typecheck test build -p web` in a clean worktree: 11 files, 52 tests pass; production build passes. - Browser acceptance could not run: GitHub Actions is blocked by the account spending limit. CI must pass before merge. ## Security considerations - Secrets stay in memory longer only while the account page is open and only until acknowledgement. Departure, session rotation and acknowledgement still clear them, and they still never serialize out of the stores. - The signed-out state after a 401 matches the server state. ## Checklist - [x] Lint, typecheck, tests and build pass locally - [x] Tests added and updated - [x] No new shell invocation and no new secret exposure path - [x] Audit events: not applicable (client only) - [x] SPEC updated - [ ] CI green (blocked by billing)
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.
The account MFA store now supports setup, activation, disable and recovery-code replacement with current-password/proof validation. Unknown server status cannot appear as disabled MFA or enable an action. Mutations share the account submission gate so sign-out and security changes cannot overlap from this page.
Provisioning seeds stay in private in-memory state until their expiry, capped at ten minutes. Recovery codes are displayed for at most ten minutes; hiding them does not revoke saved codes. Success, dismissal, timeout and destruction clear private inputs/grants, and store serialization is opaque. A display timeout during activation preserves the eventual confirmed recovery-code result. Session updates retain only public identity fields.
Validation: all 38 Angular tests pass, including seven MFA lifecycle tests covering required proofs, status failures, expiry, concurrent actions, late responses and grant isolation. Web lint/typecheck/build pass. No new dependency or backend API change. Plan/spec updated. Stacked on #67; presentation follows in M2.2e3b. No merge requested.