Important
Action required
- If your SAML IdP sends no email attribute and a
NameIDin another Format or with no Format, send anemailattribute or theemailAddressNameID Format, setsamlConfig.mapping.emailto the attribute it sends, or return the NameID frommapProfileToUser. (#12484) - If you use the OAuth provider, run
npx auth@latest migrateornpx auth@latest generatebefore upgrading to add the new optionalactcolumn onoauthAccessToken; if you setactviacustomAccessTokenClaims, an extensionclaims.accessTokencontributor, or a resource'scustomClaims, it is now stripped, so passacttoissueTokensin custom grants instead. (#12439) - If your
clientAuthenticationstrategy returns a DPoP key (jkt), the token type is nowDPoP, so make your clients send a DPoP proof with each request to a protected resource. (#12440) - If you have a custom
OAuthProviderApiimplementation, add theverifyDpopProof()andissueDpopNonce()methods. (#12437) - If your clients exchange their own access tokens bound by a mechanism other than DPoP, such as an mTLS certificate in
cnf["x5t#S256"], have yourclientAuthenticationstrategy return the sameconfirmation. (#12438)
@better-auth/oauth-provider
❗ Breaking Changes
- Added RFC 8693 delegation to
oauthTokenExchange(), so a service can exchange tokens with anactor_tokenand get anactclaim (#12439)
Features
- Added an
expectedJktoption toprovider.resolveConfirmation()so extension grants can keep a DPoP-bound token bound to the same key (#12436) - Added
verifyDpopProof()andissueDpopNonce()togetOAuthProviderApiso plugin endpoints can verify DPoP proofs and nonces (#12437)
Bug Fixes
- Fixed
client_credentialstokens to be bound to theconfirmationreturned by aclientAuthenticationstrategy, such as an mTLS certificate thumbprint (#12440) - Fixed the OAuth provider to reject a malformed sender-constraint
confirmationwithserver_errorinstead of issuing a token (#12443) - Fixed
oauthTokenExchange()to require a matchingconfirmationwhen a client exchanges its own access token bound by a mechanism other than DPoP (#12438)
For detailed changes, see CHANGELOG
@better-auth/sso
Bug Fixes
- Added a
mapProfileToUseroption so OIDC and SAML SSO providers that send no email can still sign users in (#12484) - Changed SAML sign-in to use the
NameIDas the user's email only when itsFormatis theemailAddressformat (#12484) - Fixed SAML users who sign in without a name attribute to get their email as their name instead of an opaque
NameID(#12484)
For detailed changes, see CHANGELOG
Contributors
Thanks to everyone who contributed to this release:
Full changelog: v1.8.0-beta.8...v1.8.0-beta.9