Repository navigation
fix(oidc): bind provider sessions to clients with the user's access token - #559
Merged
Merged
Conversation
Merged
6 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 namehasOidcGrantForSessionandhasOidcGrantForUserrequire the binding as well as a live grant, so revoking a grant still ends accessPOST /oidc/sessions/:id/revokeanswers only for a session bound to some clientamrorauth_time, as they already were foracr@seamless-auth/types0.35.0, which raises the provider contract to version 3Rollout
Contract-affecting for
seamless-auth-oidc-provideronly. 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 buildandnpm run coveragepass. The Postgres specs for the binding pass against a real database.