22 KiB
@better-auth/scim
1.7.0-beta.5
Patch Changes
-
#9864
41cca60Thanks @GautamBytes! - Add auser.validateUserInfoprovisioning gate that lets applications reject an identity before a user is created or a new account is linked. It runs once at the creation step for every method that provisions a user (OAuth, SSO/SAML, email/password, magic link, email OTP, anonymous, SIWE, phone number, admin-created users, and SCIM), including stateless setups with no persistent database.It also re-runs when an existing OAuth or SSO user signs in again (
source.actionis"sign-in"), where it receives the fresh provider email and profile so a domain or org policy can reject a user whose provider identity moved out of bounds. Non-provider returning sign-ins are not re-validated.The callback receives the mapped
userplus asourcedescribing theaction(create-user,link-account, orsign-in), themethod, and provider metadata:source.oauthfor OAuth providers andsource.ssofor OIDC/SAML SSO providers. Return{ error, errorDescription }to reject: browser flows redirect to the error URL and programmatic flows return a403. -
Updated dependencies [
0cbaf81,e014029,ec8a38c,7fe0e2b,4f53b61,e0d2b9e,91f235f,76a3342,41cca60]:- better-auth@1.7.0-beta.5
- @better-auth/core@1.7.0-beta.5
1.7.0-beta.4
Minor Changes
-
#9840
a8ea86eThanks @gustavovalverde! - Personal (non-organization) SCIM connections now always belong to the user who created them. Owner binding used to be opt-in through theproviderOwnershipoption, which defaulted to off. With it off, a personal connection was stored without an owner, and the management endpoints denied access only when a stored owner differed from the caller. An unowned connection passed that check for any signed-in user, who could read it, list it, regenerate its token, or delete it. Regenerating the token rotated the secret and invalidated the original.generateSCIMTokennow records the creator'suserIdon every personal connection. Thegenerate-token,list-provider-connections,get-provider-connection, anddelete-provider-connectionendpoints grant access only to that owner. Organization-scoped connections keep their existing behavior and continue to use organization membership and the configuredrequiredRolechecks.This release is breaking. It removes the
providerOwnershipoption, and owner binding can no longer be disabled. ThescimProvider.userIdcolumn is now a permanent part of the schema, so run a migration after upgrading withnpx auth migrateornpx auth generate.Connections created before this release carry no owner. Access now fails closed, so those connections are no longer reachable through the management endpoints, including token regeneration. Reclaim them at the database level: delete
scimProviderrows that have neitherorganizationIdnoruserId, or setuserIdto the intended owner, then regenerate tokens as needed. Organization-scoped connections are not affected.
1.6.16
Patch Changes
-
#9974
cb1cbfaThanks @Bekacru! - SCIM user provisioning no longer links to a pre-existing user by matching email alone. When a user with the same email already exists,createSCIMUsernow returns409(uniqueness) unless the newlinkExistingUsersoption explicitly opts in (viatrue,trustedDomains,requireExistingOrgMembership, or ashouldLinkUsercallback). Additionally, an organization-scoped SCIMDELETEnow deprovisions the user — removing their organization membership and the SCIM account link — instead of deleting the global Better Auth user. A newcanGenerateTokenoption lets applications authorize SCIM token creation, including restricting personal (non-org) tokens. -
Updated dependencies [
cb1cbfa,cb1cbfa,cb1cbfa,cb1cbfa,cb1cbfa,cb1cbfa,87e7aa5,cb1cbfa,cb1cbfa,cb1cbfa,893cf6c,cb1cbfa,cb1cbfa,5e49c56,cb1cbfa]:- better-auth@1.6.16
- @better-auth/core@1.6.16
1.6.15
Patch Changes
- Updated dependencies [
1012b69,ad60333,0933c05,b0ddfd3]:- better-auth@1.6.15
- @better-auth/core@1.6.15
1.6.14
Patch Changes
- Updated dependencies [
2d9781a,5a2d642,13abc79,9d3450a]:- better-auth@1.6.14
- @better-auth/core@1.6.14
1.6.13
Patch Changes
- Updated dependencies [
e7eb45b,03e6c94,1e5b808,13abc79]:- better-auth@1.7.0-beta.4
- @better-auth/core@1.7.0-beta.4
1.7.0-beta.3
Patch Changes
- Updated dependencies [
4e8e4c7,523f95c,729c00d]:- better-auth@1.7.0-beta.3
- @better-auth/core@1.7.0-beta.3
1.7.0-beta.2
Patch Changes
- Updated dependencies [
9aed910,acbd6ef,954b664,39d6af2]:- better-auth@1.7.0-beta.2
- @better-auth/core@1.7.0-beta.2
1.7.0-beta.1
Patch Changes
- Updated dependencies [
5142e9c,484ce6a,f875897,c7d2253,9a6d475,513dabb,6f2948e]:- better-auth@1.7.0-beta.1
- @better-auth/core@1.7.0-beta.1
1.7.0-beta.0
Patch Changes
- Updated dependencies [
6ce30cf,f6428d0,c5066fe,5f84335,93d3871,544f1c6]:- better-auth@1.7.0-beta.0
- @better-auth/core@1.7.0-beta.0
1.6.10
Patch Changes
- Updated dependencies [
1e0f26d,8c1e917,b2d655c,09f1327,906b7b3,e9c978e,e71aad3,80a655d,15ff28a,88a7c67,9a7b51d,1b25902,cf59136,a597ee0,fc02ced,9f1ef1f,36ef808,c1336c5,3a9a2c3,fde0432,2220a6d]:- better-auth@1.6.10
- @better-auth/core@1.6.10
1.6.9
Patch Changes
- Updated dependencies [
815ecf6]:- @better-auth/core@1.6.9
- better-auth@1.6.9
1.6.8
Patch Changes
1.6.7
Patch Changes
- Updated dependencies [
307196a,4a180f0,4f373ee,e1b1cfc,d053a45]:- better-auth@1.6.7
- @better-auth/core@1.6.7
1.6.6
Patch Changes
- Updated dependencies [
b5742f9,4debfb6,9ea7eb1,a844c7d,ab4c10f,a61083e,e64ff72]:- @better-auth/core@1.6.6
- better-auth@1.6.6
1.6.5
Patch Changes
1.6.4
Patch Changes
1.6.3
Patch Changes
- Updated dependencies [
5142e9c,484ce6a,f875897,6ce30cf,f6428d0,9a6d475,513dabb,c5066fe,5f84335]:- better-auth@1.6.3
- @better-auth/core@1.6.3
1.6.2
Patch Changes
- Updated dependencies [
9deb793,2cbcb9b,b20fa42,608d8c3,8409843,e78a7b1]:- better-auth@1.6.2
- @better-auth/core@1.6.2
1.6.1
Patch Changes
1.6.0
Minor Changes
- #8836
5dd9e44Thanks @gustavovalverde! - Add optional version field to the plugin interface and expose version from all built-in plugins
Patch Changes
- Updated dependencies [
dd537cb,bd9bd58,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,5dd9e44,469eee6,560230f]:- better-auth@1.6.0
- @better-auth/core@1.6.0
1.6.0-beta.0
Minor Changes
28b1291Thanks @gustavovalverde! - Add optional version field to the plugin interface and expose version from all built-in plugins