Skip to content

[Frontend] Replace legacy auth screens with wallet verification #297

@Kaylahray

Description

@Kaylahray

Description

The login and register routes still expose a legacy wallet-signature flow instead of the modern Auth.js and SEP-10 challenge flow the app already documents.

User Story

As a wallet user,
I want to sign in and register through a real wallet verification flow,
so that my session is secured by an actual Stellar signature.

Requirements and Context

  • Files: app/(auth)/login/page.tsx, app/(auth)/register/page.tsx, app/components/wallet-login-form.tsx, app/app/api/auth/challenge/route.ts, app/app/api/auth/verify/route.ts
  • Remove the legacy mock signature flow from the UI
  • Use the challenge and verify endpoints as the canonical authentication path
  • Ensure the UX makes it clear when a user is logging in versus registering

Suggested Implementation

// AUTH FLOW
// 1. Request a challenge from /api/auth/challenge.
// 2. Ask the wallet to sign the challenge.
// 3. Submit the signed payload to /api/auth/verify.
// 4. Redirect the user after a successful session is created.

Acceptance Criteria

  • Login and registration both use the real wallet verification flow.
  • The legacy mock signature logic is no longer surfaced in the UI.
  • Failed signatures are shown with a clear user-facing error.

Submission Guidelines

  • Branch: feat/wallet-auth-ui
  • Depends on: POST /api/auth/challenge and POST /api/auth/verify
  • PR: feat(frontend): switch auth screens to challenge-based wallet login

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions