Skip to content

feat(routes-f): two-factor authentication setup endpoint #525

@davedumto

Description

@davedumto

Overview

Implement app/api/routes-f/2fa/route.ts for enabling and managing two-factor authentication.

Scope

  • GET /api/routes-f/2fa/status — returns current 2FA status for authenticated user
  • POST /api/routes-f/2fa/setup — initiates TOTP setup, returns otpauth_uri and QR code data
  • POST /api/routes-f/2fa/verify — confirms setup with a valid TOTP code
  • DELETE /api/routes-f/2fa — disable 2FA (requires current TOTP code)

Acceptance Criteria

  • TOTP secret stored encrypted at rest (AES-256)
  • 5 backup codes generated on enable, returned once
  • Verify enforces a 30-second window ± 1 step
  • Route lives exclusively in app/api/routes-f/2fa/

Notes

Standalone — no dependency on other open issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programroutes-fStandalone API route in app/api/routes-f/

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions