Skip to content

Security settings: the two-factor toggle only flips local state #1508

Closed

Description

@mftee

The 2FA toggle awaits a 600 ms timer (// Replace with: await api.patch('/auth/2fa', { enabled: !enabled })) and updates component state, so the UI says 2FA is on or off with no relation to the account. The real enrolment pages under /2fa/setup and /2fa/verify are not linked from this switch.

Where

  • frontend/app/[locale]/(protected)/settings/security/page.tsx
  • frontend/app/[locale]/2fa/setup/page.tsx

Suggested fix
Initialise the toggle from auth/me (twoFactorEnabled), start enrolment by navigating to the setup flow when turning it on, and require a password or code to turn it off.

Acceptance criteria

  • State always reflects the server value
  • Enabling starts the real setup flow
  • No local-only state change

Activity

  1. monique-7arch commented on Oct 17, 2026

    @monique-7arch
    Contributor

    @monique-7arch has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hello, I'm interested in taking this issue on.

    I'm a full-stack developer with solid experience in modern JavaScript/TypeScript, REST APIs, and frontend frameworks like React. I enjoy working in open source and following existing project conventions.

    I understand what's being asked here and I'm confident I can implement this correctly and efficiently.

    Looking forward to contributing — please assign this issue to me.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @monique-7arch to this issue.

  2. OffixialSydney commented on Oct 17, 2026

    @OffixialSydney

    @OffixialSydney has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hello Maintainer, I’ve gone through the issue and its acceptance criteria carefully. I understand what needs to be implemented and am confident I can deliver a solution that aligns with the expected design.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @OffixialSydney to this issue.

  3. drips-wave commented on Oct 17, 2026

    @drips-wave

    Congratulations, @monique-7arch! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @monique-7arch: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  4. grantfox-oss commented on Oct 17, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @monique-7arch's PR #1554 was approved and merged by @mftee.

    🏆 @monique-7arch: You earned 40 FoxPoints for this contribution! Your current tier: Builder (1,068 total points). Track your full progress on GrantFox.

    👏 Great work, @monique-7arch! Keep contributing to CodeGirlsInc.

  5. added a commit that references this issue on Oct 17, 2026
  6. drips-wave commented on Oct 17, 2026

    @drips-wave

    This issue has been completed by @monique-7arch as part of the Stellar Wave Program's 10th Wave 🥳

    😎 @monique-7arch: You earned 200 Points for completing this issue! Once the Wave's rewards are finalized, you'll be eligible for a percentage of the Wave's reward pool based on the percentage of total points you've earned. Learn more here. You can also Leave a review to share your experience working on this issue.

    🧑‍💻 Repo maintainers: How'd the contributor do? Leave a review to share your experience working with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions