GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: show success after email 2FA activation by shazia-k · Pull Request #535 · OpenResilienceInitiative/ORISO-Frontend

Conversation

@shazia-k

@shazia-k shazia-k commented Jul 19, 2026 •
edited by coderabbitai Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

What changed

  • Treat the immediate user-data refresh as best-effort after the backend has successfully activated a 2FA credential.
  • Show the correct App or E-mail success step even when the current login token still contains stale account data.
  • Preserve the parent refresh-failure notification without misreporting the already-successful OTP confirmation.
  • Add regression coverage for stale refreshes after both E-mail and App activation.

Root cause

The live E-mail flow successfully validated the code and switched the Keycloak credential to E-mail. The subsequent reloadUserData() call failed or returned stale data because the current session still represented the previous account e-mail. The setup dialog treated that secondary refresh problem as an OTP confirmation failure, leaving users on the code screen even though 2FA had already changed.

User impact

After a valid E-mail code is accepted, users now see the success screen. Updated account data is picked up normally after the session refresh/next login.

Validation

  • TwoFactorSetupDialog.test.tsx: 9/9 tests passed.
  • ESLint, Prettier, and git diff --check passed for both changed files.
  • Full repository gates were attempted. They remain blocked by unrelated checkout/repository issues: missing installed OpenTelemetry/Joyride/TipTap packages, existing localStorage test-environment failures, and dependency resolution conflict between React 19 and @cypress/react during npm ci.

Summary by CodeRabbit

  • Bug Fixes
    • Improved two-factor authentication setup behavior when account information refreshes fail after activation.
    • Setup now continues to the appropriate success confirmation instead of displaying an incorrect setup error.
    • Ensures setup-aborted handling is triggered consistently in these scenarios.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@shazia-k
fix: show success after email 2FA activation
4e322ed
@coderabbitai

coderabbitai Bot commented Jul 19, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 98de76f7-e174-4dce-ba94-e6603919c1fb

📥 Commits

Reviewing files that changed from the base of the PR and between 4ec3f55 and 4e322ed.

📒 Files selected for processing (2)
  • src/components/twoFactorAuth/TwoFactorSetupDialog.test.tsx
  • src/components/twoFactorAuth/TwoFactorSetupDialog.tsx
📜 Recent review details
⏰ Context from checks skipped due to timeout. (4)
  • GitHub Check: lint, type-check, test, build and Docker validation
  • GitHub Check: lint, type-check, build and Storybook Docker validation
  • GitHub Check: lint, type-check and build frontend
  • GitHub Check: lint, type-check, build and test frontend
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,js,jsx}: Keep shared behavior in hooks/utilities when multiple screens need the same state, route, selection, or formatting logic.
UI changes must have accessible focus/keyboard behavior and must not rely on color alone.

Files:

  • src/components/twoFactorAuth/TwoFactorSetupDialog.tsx
  • src/components/twoFactorAuth/TwoFactorSetupDialog.test.tsx
**/*.{scss,sass,css,ts,tsx,js,jsx}

📄 CodeRabbit inference engine (AGENTS.md)

Reuse existing design tokens, Sass mixins, and component patterns; avoid one-off hardcoded CSS for controls, active list states, focus rings, and responsive layout.

Files:

  • src/components/twoFactorAuth/TwoFactorSetupDialog.tsx
  • src/components/twoFactorAuth/TwoFactorSetupDialog.test.tsx
src/**/*.{ts,tsx,js,jsx}

⚙️ CodeRabbit configuration file

src/**/*.{ts,tsx,js,jsx}: Check behavior against the surrounding ORISO flow, not only types.
Flag duplicated route/state logic, missing error/loading handling,
privacy regressions around Matrix/chat/drafts, and changes that should
be expressed through shared hooks or utilities instead of local flags.

Files:

  • src/components/twoFactorAuth/TwoFactorSetupDialog.tsx
  • src/components/twoFactorAuth/TwoFactorSetupDialog.test.tsx
🔇 Additional comments (2)
src/components/twoFactorAuth/TwoFactorSetupDialog.tsx (1)

311-335: LGTM!

Also applies to: 377-377, 400-400

src/components/twoFactorAuth/TwoFactorSetupDialog.test.tsx (1)

491-522: LGTM!

Also applies to: 553-553, 575-580


📝 Walkthrough

Walkthrough

TwoFactorSetupDialog now treats post-activation completion refresh failures as non-fatal: it invokes onSetupAborted when available, advances to the relevant success step, and suppresses setup errors. Tests cover the email and app flows.

Changes

Two-factor setup completion

Layer / File(s) Summary
Non-fatal setup completion handling
src/components/twoFactorAuth/TwoFactorSetupDialog.tsx
finishSetup handles completion failures without setting error state, notifies onSetupAborted, and advances app and email flows to their success steps.
Refresh-failure behavior tests
src/components/twoFactorAuth/TwoFactorSetupDialog.test.tsx
Tests verify success-step rendering, abort-callback invocation, and suppression of setup errors after refresh failures.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant ActivationFlow
  participant TwoFactorSetupDialog
  participant onSetupComplete
  participant onSetupAborted
  ActivationFlow->>TwoFactorSetupDialog: activate app or email setup
  TwoFactorSetupDialog->>onSetupComplete: complete setup
  onSetupComplete-->>TwoFactorSetupDialog: success or STALE_USER_DATA rejection
  TwoFactorSetupDialog->>onSetupAborted: notify abort on rejection
  TwoFactorSetupDialog-->>ActivationFlow: advance to success step
Loading

Suggested labels: coderabbit

Suggested reviewers: storypapst

🚥 Pre-merge checks | ✅ 7
✅ Passed checks (7 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise, conventional, and clearly matches the email 2FA activation success handling change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Validation Evidence ✅ Passed Behavior-changing code is covered by new regression tests, and the PR description lists exact validation results including 9/9 tests passed.
Shared Ui Architecture ✅ Passed PASS: The PR only refactors 2FA completion logic and tests; no new UI primitive or duplicate interaction pattern was introduced, and it reuses existing MUI/helpers.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/email-2fa-success-sync

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
  • X
  • Mastodon
  • Reddit
  • LinkedIn

Comment @coderabbitai help to get the list of available commands.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@shazia-k
shazia-k marked this pull request as ready for review July 19, 2026 11:25
coderabbitai[bot]
coderabbitai Bot approved these changes Jul 19, 2026
View reviewed changes
@shazia-k
shazia-k merged commit 9bb90b9 into pre-dev Jul 19, 2026
5 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@shazia-k
shazia-k deleted the fix/email-2fa-success-sync branch July 19, 2026 11:34
@Storypapst Storypapst mentioned this pull request Jul 19, 2026
fix: contain Matrix sync startup failures #540
Merged
This was referenced Jul 20, 2026
Align mandatory 2FA and voice-player UI with M3 tokens #568
Closed
2FA email setup: Connect step shows 'E-Mail-Adresse' label instead of one-time-code input #578
Closed
@Storypapst Storypapst mentioned this pull request Jul 22, 2026
fix: show success after email 2FA activation #610
Closed
This was referenced Jul 28, 2026
EPIC: Auth flows — registration, login, password recovery (MD3) #812
Closed
Login screen rework + optional second factor (2FA) for advice-seekers #255
Closed
This was referenced Aug 1, 2026
Consultant deep links are swallowed by forced 2FA onboarding redirect #841
Closed
2FA setup dialog: success step uses off-scheme green check and a wrapped close button #854
Closed
fix(2fa): put the setup success card on the M3 scheme #855
Closed
Profile settings: introduce 'Sicherheit & Datenschutz' section with grouped security, recovery and privacy options #878
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@coderabbitai coderabbitai[bot] coderabbitai[bot] approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@shazia-k
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.