Skip to content

feat(oauth): add the state binding to the start response and callback request - #104

Merged
Bccorb merged 1 commit into
mainfrom
fix/oauth-state-binding
Oct 21, 2026
Merged

Bccorb merged 1 commit into
mainfrom
fix/oauth-state-binding

Conversation

@Bccorb

@Bccorb Bccorb commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Adds binding to StartOAuthLoginResponseSchema and FinishOAuthLoginRequestSchema, for fells-code/seamless-auth-api#463.

The auth server will return a random binding from /oauth/:providerId/start, put its hash in the signed state, and require it on /oauth/:providerId/callback, so a state can only be finished by the client that started the sign-in (login CSRF, RFC 9700 section 4.7).

Both fields are optional in the schemas so a client can still parse a response from an older auth server. The auth server enforces presence itself.

Contract change. Release order: this package, then the API (#463), then @seamless-auth/client / react / react-native.

Checks: typecheck, lint, format:check clean; vitest 290 passed; build ok.

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