Conversation
POST /sso/token returned only access_token and profile, so SDKs that parse the spec's SsoTokenResponse (workos-python 10.5 get_profile_and_token) failed on the missing expires_in, and then on the profile's missing name. - Add token_type: "Bearer" and expires_in (600s, the spec's example) to the response, and sign the access token with that same lifetime. - Derive the spec-required, nullable Profile.name from first_name/last_name in formatSSOProfile, so /sso/profile gets it too. Fixes workos#129
|
/sso/profile resolved an issued token through the store before verifying it, so a token kept working after the expires_in that /sso/token reported. Verify the signature and exp first, for every token, then resolve the profile. Adds the first /sso/profile tests: a token is accepted until expires_in has passed and refused after, and an unsigned token is refused.
burkestar
added a commit
to burkestar/emulate
that referenced
this pull request
Oct 6, 2026
burkestar
added a commit
to burkestar/emulate
that referenced
this pull request
Oct 6, 2026
Fork build carrying workos#130 and workos#132 until upstream releases them. The release-please manifest stays at 0.14.0 so upstream releases merge cleanly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Fixes #129
Problem
The
POST /sso/tokenresponse (authorization_code grant) has onlyaccess_tokenandprofile.workos-python10.5.0 parses it asSSOTokenResponse, which requiresexpires_inand declarestoken_type: "Bearer". Becauseexpires_inis missing,client.sso.get_profile_and_token(code=...)fails, so SSO login can't be completed against the emulator.Changes
/sso/profileignored