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
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
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
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.tsSuggested Implementation
Acceptance Criteria
Submission Guidelines
feat/wallet-auth-uiPOST /api/auth/challengeandPOST /api/auth/verifyfeat(frontend): switch auth screens to challenge-based wallet login