Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0
Why this matters
auth.ts requires /v1/auth/verify to submit a tx whose manageData value equals the server-issued nonce, then issues a JWT used as the Bearer token. But docs/AUTHENTICATION.md:84-104 tells clients to put their own random crypto.randomBytes(32) in manageData and send the raw signed XDR as Authorization: Bearer <signed_transaction> - the pre-nonce model that is replay-prone. It also recommends optionalAuthMiddleware (dead code) and stale error strings. A client following this doc cannot authenticate.
Acceptance criteria
Files to touch
backend/docs/AUTHENTICATION.md
backend/src/middleware/auth.ts
Out of scope
- Changing the auth implementation itself
Why this matters
auth.ts requires /v1/auth/verify to submit a tx whose manageData value equals the server-issued nonce, then issues a JWT used as the Bearer token. But docs/AUTHENTICATION.md:84-104 tells clients to put their own random crypto.randomBytes(32) in manageData and send the raw signed XDR as Authorization: Bearer <signed_transaction> - the pre-nonce model that is replay-prone. It also recommends optionalAuthMiddleware (dead code) and stale error strings. A client following this doc cannot authenticate.
Acceptance criteria
Files to touch
backend/docs/AUTHENTICATION.mdbackend/src/middleware/auth.tsOut of scope