Skip to content

fix(oidc): bind provider sessions to clients with the user's access token - #559

Merged
Bccorb merged 2 commits into
mainfrom
fix/oidc-grant-binding
Nov 1, 2026
Merged

Bccorb merged 2 commits into
mainfrom
fix/oidc-grant-binding

Conversation

@Bccorb

@Bccorb Bccorb commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The API now owns the binding between a first-party session and the provider clients it signed in to. The provider service creates a binding with POST /oidc/sessions/:id/bind, presenting the user's own access token for that session. Provider lookups, user token signing, session revoke and account notices all require it, so records the provider service writes on its own no longer bind a session to a client.

Part of #558.

Changes

  • POST /oidc/sessions/:id/bind: validates the access token, requires its session to be the one named, refuses recovery sessions and inactive clients, and records the binding under a model the payload routes cannot name
  • hasOidcGrantForSession and hasOidcGrantForUser require the binding as well as a live grant, so revoking a grant still ends access
  • POST /oidc/sessions/:id/revoke answers only for a session bound to some client
  • Device-flow tokens are refused when they carry amr or auth_time, as they already were for acr
  • @seamless-auth/types 0.35.0, which raises the provider contract to version 3

Rollout

Contract-affecting for seamless-auth-oidc-provider only. It must be upgraded together with this release (fells-code/seamless-auth-oidc-provider#45). Provider sessions made before the upgrade have no binding, so their users sign in again to get new provider tokens. Server adapters and SDKs are unaffected.

Checks

npm run typecheck, npm run lint, npx prettier --check ., npm run build and npm run coverage pass. The Postgres specs for the binding pass against a real database.

@Bccorb Bccorb added security Security-sensitive: auth, tokens, OTP, sessions, crypto P1 Security work outside the FIDO2 track v0.22 Targets the v0.22 release labels Nov 1, 2026
@Bccorb
Bccorb merged commit ffa34ca into main Nov 1, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P1 Security work outside the FIDO2 track security Security-sensitive: auth, tokens, OTP, sessions, crypto v0.22 Targets the v0.22 release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant