Important
Action required
- If you use ID token sign-in with a provider that has no
clientId, setclientIdto every client ID your apps sign in with. (#11931)
better-auth
Bug Fixes
- Fixed the JWT plugin to verify JWTs and session cookie-cache JWTs with the stored key's algorithm instead of the token header's, and to warn when signing or verifying a JWT without an issuer or audience (#11925)
- Fixed OAuth callbacks completed through the OAuth proxy to run the same checks as the standard OAuth callback, including issuer and ID token nonce validation (#11930)
- Fixed
auth.api.getSession()to keep the original database error aserror.causewhen the session lookup fails (#11924)
For detailed changes, see CHANGELOG
@better-auth/core
Bug Fixes
- Fixed
mapProfileToUserfailing to typecheck underexactOptionalPropertyTypeswhen it returnsundefinedforname,email, orimage(#11918) - Fixed ID token sign-in to reject tokens when the provider has no client ID, since their audience cannot be checked (#11931)
- Fixed a custom Facebook
getUserInfoto no longer receive client-submitted access tokens issued to another Facebook app, and ID tokens missingexporiatare now rejected (#11919) - Restored the Twitch and Paybin ID token handling from before 1.7.11, which made account info fail once the ID token stored at sign-in expired (#11920)
- Added a
causeoption as a third argument toAPIError.from()to keep the underlying error for server-side callers without exposing it in the response (#11924)
For detailed changes, see CHANGELOG
@better-auth/mcp
Bug Fixes
- Fixed
requireMcpAuthto accept only OAuth access tokens and reject session JWTs from the JWT plugin, even when they share the issuer and audience (#11934)
For detailed changes, see CHANGELOG
@better-auth/sso
Bug Fixes
- Fixed OIDC SSO sign-in to reject ID tokens missing
exporiatand providers with an empty client ID, matching social sign-in (#11935)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
Full changelog: v1.7.11...v1.7.12