Skip to content

adds vapor authentication paths - #111

Open
loloop wants to merge 3 commits into
developfrom
mauricio/vapor-auth
Open

adds vapor authentication paths#111
loloop wants to merge 3 commits into
developfrom
mauricio/vapor-auth

Conversation

@loloop

@loloop loloop commented Aug 10, 2026

Copy link
Copy Markdown
Member

This PR adds Auth, AppAttest and basic user requirements for the Vapor backend

@claude

claude Bot commented Aug 10, 2026

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

…ddleware

- CBOR: bound declared array/map counts by remaining input (malicious
  headers could trap or trigger giant allocations), limit nesting depth
  to 16, and reject trailing bytes after a complete item
- Sign in: prefer the email from the verified Apple identity token over
  the client-supplied body value; recover from concurrent first sign-in
  unique-constraint races by adopting the winner's row
- AppAttestMiddleware: cap body buffering at the app's default body size
  limit; persist assertion sign counts with a conditional update so
  concurrent assertions cannot move the counter backwards
- TokenService: run rotation in a transaction with a conditional
  claim (UPDATE ... AND revoked = false RETURNING) so concurrent
  rotations have exactly one winner; presenting an already-revoked
  token now revokes the user's entire token family (theft detection)
- ChallengeStore: bound the store, evicting the oldest-expiring entry
- AccountPurgeService: also sweep expired refresh tokens (revoked but
  unexpired rows are kept for reuse detection)
- TokenEncryption.load: drop unused Environment parameter
- Revert incidental Xcode churn (xcodecloud manifest, Watch scheme)
- Tests: CBOR abuse cases, bounded challenge store, and a
  Postgres-gated rotation/reuse-detection integration suite
  (TEST_DATABASE=1 to enable)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@claude

claude Bot commented Aug 10, 2026

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant