Skip to content

fix(api): enforce atomic single-use authorization code redemption#84

Open
markwylde wants to merge 3 commits intomainfrom
fix/auth-code-atomic-consume
Open

fix(api): enforce atomic single-use authorization code redemption#84
markwylde wants to merge 3 commits intomainfrom
fix/auth-code-atomic-consume

Conversation

@markwylde
Copy link
Member

Summary

  • enforce atomic compare-and-set consumption for authorization codes during token redemption
  • reject concurrent or replayed code redemption attempts with invalid_grant
  • add regression coverage for concurrent redemption in both public and confidential client flows
  • add model-level tests for consumeAuthCode success/failure semantics
  • update README, specs, and brochureware docs to reflect atomic single-use code redemption

Testing

  • cd packages/api && npx tsx --test src/models/authCodes.test.ts
  • cd packages/test-suite && PW_REPORTER=dot PW_ARTIFACTS=off npx playwright test tests/api/oidc-nonce-code-flow.spec.ts --reporter=dot --workers=1
  • npm run tidy
  • npm run build

Issue

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.

Make authorization code redemption single-use and atomic

1 participant