Description
The login and register handlers still implement mock wallet signature verification, even though the app also contains a challenge and verify flow.
User Story
As a wallet user,
I want to authenticate with a real signed challenge,
so that my session is issued from a verifiable Stellar proof.
Requirements and Context
- Files:
app/app/(auth)/login/route.ts, app/app/(auth)/register/route.ts, app/app/api/auth/challenge/route.ts, app/app/api/auth/verify/route.ts
- Remove or fully retire the legacy mock signature verification path
- Make the challenge/verify flow the canonical login path
- Keep replay protection and nonce verification intact
Suggested Implementation
// AUTH REFACTOR
// 1. Issue a challenge nonce.
// 2. Verify the signed challenge with Stellar tooling.
// 3. Create or fetch the user record.
// 4. Mint the session token only after verification succeeds.
Acceptance Criteria
Submission Guidelines
- Branch:
feat/remove-mock-wallet-auth
- Depends on: SEP-10 verification flow
- PR:
feat(backend): retire mock wallet auth and unify challenge verification
Description
The login and register handlers still implement mock wallet signature verification, even though the app also contains a challenge and verify flow.
User Story
As a wallet user,
I want to authenticate with a real signed challenge,
so that my session is issued from a verifiable Stellar proof.
Requirements and Context
app/app/(auth)/login/route.ts,app/app/(auth)/register/route.ts,app/app/api/auth/challenge/route.ts,app/app/api/auth/verify/route.tsSuggested Implementation
Acceptance Criteria
Submission Guidelines
feat/remove-mock-wallet-authfeat(backend): retire mock wallet auth and unify challenge verification