fix(oidc): compatibility with exact-optional-property#6502
Merged
himself65 merged 5 commits intobetter-auth:canaryfrom Dec 4, 2025
Merged
Conversation
|
@ping-maxwell is attempting to deploy a commit to the better-auth Team on Vercel. A member of the Team first needs to authorize it. |
better-auth
@better-auth/cli
@better-auth/core
@better-auth/expo
@better-auth/passkey
@better-auth/scim
@better-auth/sso
@better-auth/stripe
@better-auth/telemetry
commit: |
himself65
approved these changes
Dec 3, 2025
Member
Author
|
@himself65 tests still failing for some reason, dont merge yet |
Contributor
|
type is broken now |
Contributor
|
see smoke test CI |
Contributor
There was a problem hiding this comment.
2 issues found across 10 files
Prompt for AI agents (all 2 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/better-auth/src/plugins/jwt/types.ts">
<violation number="1" location="packages/better-auth/src/plugins/jwt/types.ts:97">
P2: The `| undefined` is applied to the function's return type, not the property itself. This changes the function's semantic to allow returning `undefined`, which may not be intended. For `exactOptionalPropertyTypes` compatibility, wrap the entire function type in parentheses like the `sign` property does.</violation>
<violation number="2" location="packages/better-auth/src/plugins/jwt/types.ts:106">
P2: The `| undefined` is applied to the function's return type, not the property itself. This changes the function's semantic to allow returning `undefined`, which may not be intended. For consistency with `sign`, wrap the entire function type in parentheses.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
Member
Author
Yeah I added oidc to the smoke CI. im working on it. |
Member
Author
|
@himself65 it's fixed now |
himself65
pushed a commit
that referenced
this pull request
Dec 4, 2025
Contributor
|
✅ Automatically cherry-picked to |
Paola3stefania
pushed a commit
to Paola3stefania/better-auth
that referenced
this pull request
Dec 5, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
closes #6491
Summary by cubic
Fixes OIDC and JWT handling when TypeScript’s exactOptionalPropertyTypes is enabled, ensuring safe defaults and optional fields don’t cause build or runtime errors. Improves reliability of OIDC flows by guarding undefined values and using explicit defaults.
Written for commit 53d2f64. Summary will update automatically on new commits.