Repository navigation
Conversation
Since better-auth 1.7 the id_token is sparse and the scope-gated claims live in the UserInfo response. The end-to-end flow now requests the planner's scopes (openid profile email) and asserts what the planner resolves identity from: the sub claim matching the id_token, plus email, email_verified, and name.
mroderick
force-pushed
the
test/userinfo-claims
branch
from
October 7, 2026 12:06
e8e0c82 to
1a98095
Compare
This branch has not been deployed
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.
The end-to-end OAuth flow test now asserts the userinfo response the planner resolves member identity from:
submatching the id_tokensub,email,email_verified, andname. The flow requests the planner's scopes (openid profile email), which the test harness now allows like productionsrc/auth.jsdoes.No production code changes: the deployed claim resolution already returns everything the planner needs. The test pins that contract so a userinfo regression fails CI.
Review notes
Focus on the userinfo assertions in Step 5. They run against better-auth 1.7.5 (the lockfile version), where the id_token is sparse and userinfo is the only source of the scope-gated claims. The
nameassertion sets a name over SQL first, because magic-link sign-up creates the user with an empty name and an empty name is the shape upstream better-auth#11193 crashes on.Related: codebar/planner#2989, #83