Skip to content

fix(api): bind refresh tokens to issuing client_id#83

Merged
markwylde merged 3 commits intomainfrom
fix/refresh-token-client-binding
Feb 16, 2026
Merged

fix(api): bind refresh tokens to issuing client_id#83
markwylde merged 3 commits intomainfrom
fix/refresh-token-client-binding

Conversation

@markwylde
Copy link
Member

Summary

Bind refresh tokens to the issuing client so a token minted for one client cannot be refreshed by another.

Changes

  • persist issuing clientId in user session data when minting refresh tokens from /token authorization_code flow
  • enforce refresh-token client binding in /token refresh_token flow
  • reject refresh attempts when binding is missing or client does not match
  • add API tests for client binding extraction and mismatch rejection
  • update specs and whitepaper docs to document client-bound refresh behavior

Validation

  • npm run -w packages/api test -- src/controllers/token.test.ts --test-reporter=dot
  • npm run tidy
  • npm run build

Closes #80

@markwylde markwylde merged commit b324b28 into main Feb 16, 2026
17 checks passed
@markwylde markwylde deleted the fix/refresh-token-client-binding branch February 16, 2026 22:31
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.

Bind refresh tokens to issuing client_id

1 participant