@better-auth/sso 1.7.0-rc.3 → 1.7.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/client.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as SSOPlugin } from "./index-Sxfa9KQp.mjs";
1
+ import { t as SSOPlugin } from "./index-nfENSAuB.mjs";
2
2
  import { DBFieldAttribute } from "better-auth/db";
3
3
  //#region src/client.d.ts
4
4
  interface SSOClientOptions {
package/dist/client.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_VERSION } from "./version-xoFrTW0m.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-Do0kTnv7.mjs";
2
2
  //#region src/client.ts
3
3
  const ssoClient = (options) => {
4
4
  return {
@@ -263,7 +263,7 @@ interface BaseSSOUserResolutionInput {
263
263
  providerId: string;
264
264
  accountKey: {
265
265
  issuer: string;
266
- providerAccountId: string;
266
+ accountId: string;
267
267
  };
268
268
  providerUser: SSOProviderUserProfile;
269
269
  providerReference: SSOProviderReference;
package/dist/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as SAMLIdentityProviderMetadata, B as SSOUserResolutionContext, C as deriveSAMLIdentityProviderEntityID, D as DEFAULT_MAX_SAML_RESPONSE_SIZE, E as DEFAULT_MAX_SAML_METADATA_SIZE, F as SSOProviderMutationGuardInput, G as DigestAlgorithm, H as AlgorithmValidationOptions, I as SSOProviderReference, K as KeyEncryptionAlgorithm, L as SSOProviderUserProfile, M as SSOOptions, N as SSOProvider, O as OIDCConfig, P as SSOProviderMutationGuardContext, R as SSOSAMLUserResolutionInput, S as SAMLServiceProviderPolicy, T as DEFAULT_CLOCK_SKEW_MS, U as DataEncryptionAlgorithm, V as SSOUserResolutionInput, W as DeprecatedAlgorithmBehavior, _ as REQUIRED_DISCOVERY_FIELDS, a as fetchDiscoveryDocument, b as TimestampValidationOptions, c as normalizeUrl, d as validateDiscoveryUrl, f as DiscoverOIDCConfigParams, g as OIDCDiscoveryDocument, h as HydratedOIDCConfig, i as discoverOIDCConfig, j as SSOOIDCUserResolutionInput, k as SAMLConfig, l as selectTokenEndpointAuthMethod, m as DiscoveryErrorCode, n as sso, o as needsRuntimeDiscovery, p as DiscoveryError, q as SignatureAlgorithm, r as computeDiscoveryUrl, s as normalizeDiscoveryUrls, t as SSOPlugin, u as validateDiscoveryDocument, v as RequiredDiscoveryField, w as deriveSAMLServiceProviderPolicy, x as validateSAMLTimestamp, y as SAMLConditions, z as SSOUserResolution } from "./index-Sxfa9KQp.mjs";
1
+ import { A as SAMLIdentityProviderMetadata, B as SSOUserResolutionContext, C as deriveSAMLIdentityProviderEntityID, D as DEFAULT_MAX_SAML_RESPONSE_SIZE, E as DEFAULT_MAX_SAML_METADATA_SIZE, F as SSOProviderMutationGuardInput, G as DigestAlgorithm, H as AlgorithmValidationOptions, I as SSOProviderReference, K as KeyEncryptionAlgorithm, L as SSOProviderUserProfile, M as SSOOptions, N as SSOProvider, O as OIDCConfig, P as SSOProviderMutationGuardContext, R as SSOSAMLUserResolutionInput, S as SAMLServiceProviderPolicy, T as DEFAULT_CLOCK_SKEW_MS, U as DataEncryptionAlgorithm, V as SSOUserResolutionInput, W as DeprecatedAlgorithmBehavior, _ as REQUIRED_DISCOVERY_FIELDS, a as fetchDiscoveryDocument, b as TimestampValidationOptions, c as normalizeUrl, d as validateDiscoveryUrl, f as DiscoverOIDCConfigParams, g as OIDCDiscoveryDocument, h as HydratedOIDCConfig, i as discoverOIDCConfig, j as SSOOIDCUserResolutionInput, k as SAMLConfig, l as selectTokenEndpointAuthMethod, m as DiscoveryErrorCode, n as sso, o as needsRuntimeDiscovery, p as DiscoveryError, q as SignatureAlgorithm, r as computeDiscoveryUrl, s as normalizeDiscoveryUrls, t as SSOPlugin, u as validateDiscoveryDocument, v as RequiredDiscoveryField, w as deriveSAMLServiceProviderPolicy, x as validateSAMLTimestamp, y as SAMLConditions, z as SSOUserResolution } from "./index-nfENSAuB.mjs";
2
2
  export { type AlgorithmValidationOptions, DEFAULT_CLOCK_SKEW_MS, DEFAULT_MAX_SAML_METADATA_SIZE, DEFAULT_MAX_SAML_RESPONSE_SIZE, DataEncryptionAlgorithm, type DeprecatedAlgorithmBehavior, DigestAlgorithm, type DiscoverOIDCConfigParams, DiscoveryError, type DiscoveryErrorCode, type HydratedOIDCConfig, KeyEncryptionAlgorithm, type OIDCConfig, type OIDCDiscoveryDocument, REQUIRED_DISCOVERY_FIELDS, type RequiredDiscoveryField, type SAMLConditions, type SAMLConfig, type SAMLIdentityProviderMetadata, type SAMLServiceProviderPolicy, type SSOOIDCUserResolutionInput, type SSOOptions, SSOPlugin, type SSOProvider, type SSOProviderMutationGuardContext, type SSOProviderMutationGuardInput, type SSOProviderReference, type SSOProviderUserProfile, type SSOSAMLUserResolutionInput, type SSOUserResolution, type SSOUserResolutionContext, type SSOUserResolutionInput, SignatureAlgorithm, type TimestampValidationOptions, computeDiscoveryUrl, deriveSAMLIdentityProviderEntityID, deriveSAMLServiceProviderPolicy, discoverOIDCConfig, fetchDiscoveryDocument, needsRuntimeDiscovery, normalizeDiscoveryUrls, normalizeUrl, selectTokenEndpointAuthMethod, sso, validateDiscoveryDocument, validateDiscoveryUrl, validateSAMLTimestamp };
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as PACKAGE_VERSION } from "./version-xoFrTW0m.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-Do0kTnv7.mjs";
2
2
  import { APIError, addOAuthServerContext, createAuthEndpoint, createAuthMiddleware, getSessionFromCtx, sessionMiddleware } from "better-auth/api";
3
3
  import { XMLParser, XMLValidator } from "fast-xml-parser";
4
4
  import { X509Certificate } from "node:crypto";
@@ -2944,7 +2944,7 @@ async function processSAMLResponse(ctx, params, options) {
2944
2944
  };
2945
2945
  const accountKey = {
2946
2946
  issuer,
2947
- providerAccountId: userInfo.id
2947
+ accountId: userInfo.id
2948
2948
  };
2949
2949
  const isTrustedProvider = "domainVerified" in provider && !!provider.domainVerified && validateEmailDomain(userInfo.email, provider.domain);
2950
2950
  const callbackUrl = redirectCandidates.some(Boolean) ? samlRedirectUrl : ctx.context.baseURL;
@@ -2983,7 +2983,7 @@ async function processSAMLResponse(ctx, params, options) {
2983
2983
  account: {
2984
2984
  providerId,
2985
2985
  issuer: accountKey.issuer,
2986
- providerAccountId: accountKey.providerAccountId,
2986
+ accountId: accountKey.accountId,
2987
2987
  accessToken: "",
2988
2988
  refreshToken: ""
2989
2989
  },
@@ -3030,7 +3030,7 @@ async function processSAMLResponse(ctx, params, options) {
3030
3030
  profile: {
3031
3031
  providerType: "saml",
3032
3032
  providerId,
3033
- providerAccountId: userInfo.id,
3033
+ accountId: userInfo.id,
3034
3034
  email: userInfo.email,
3035
3035
  emailVerified: userInfo.emailVerified,
3036
3036
  rawAttributes: attributes
@@ -3891,7 +3891,7 @@ async function handleOIDCCallback(ctx, options, providerId, stateData, parsedPro
3891
3891
  };
3892
3892
  const accountKey = {
3893
3893
  issuer: verifiedIdToken && readStringClaim(verifiedIdToken.payload, "iss") || provider.issuer,
3894
- providerAccountId: userInfoId
3894
+ accountId: userInfoId
3895
3895
  };
3896
3896
  const isTrustedProvider = "domainVerified" in provider && provider.domainVerified === true && validateEmailDomain(userInfoEmail, provider.domain);
3897
3897
  let linked;
@@ -3935,7 +3935,7 @@ async function handleOIDCCallback(ctx, options, providerId, stateData, parsedPro
3935
3935
  accessToken: tokenResponse.accessToken,
3936
3936
  refreshToken: tokenResponse.refreshToken,
3937
3937
  issuer: accountKey.issuer,
3938
- providerAccountId: userInfoId,
3938
+ accountId: userInfoId,
3939
3939
  providerId: provider.providerId,
3940
3940
  accessTokenExpiresAt: tokenResponse.accessTokenExpiresAt,
3941
3941
  refreshTokenExpiresAt: tokenResponse.refreshTokenExpiresAt,
@@ -3993,7 +3993,7 @@ async function handleOIDCCallback(ctx, options, providerId, stateData, parsedPro
3993
3993
  profile: {
3994
3994
  providerType: "oidc",
3995
3995
  providerId: provider.providerId,
3996
- providerAccountId: userInfoId,
3996
+ accountId: userInfoId,
3997
3997
  email: userInfoEmail,
3998
3998
  emailVerified: Boolean(userInfo.emailVerified),
3999
3999
  rawAttributes: userInfo
@@ -1,5 +1,5 @@
1
1
  //#endregion
2
2
  //#region src/version.ts
3
- const PACKAGE_VERSION = "1.7.0-rc.3";
3
+ const PACKAGE_VERSION = "1.7.0-rc.4";
4
4
  //#endregion
5
5
  export { PACKAGE_VERSION as t };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@better-auth/sso",
3
- "version": "1.7.0-rc.3",
3
+ "version": "1.7.0-rc.4",
4
4
  "description": "SSO plugin for Better Auth",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -67,21 +67,21 @@
67
67
  "@types/body-parser": "^1.19.6",
68
68
  "@types/express": "^5.0.6",
69
69
  "better-call": "1.3.7",
70
- "body-parser": "^2.2.2",
70
+ "body-parser": "^2.3.0",
71
71
  "express": "^5.2.1",
72
72
  "kysely": "^0.28.17 || ^0.29.0",
73
73
  "oauth2-mock-server": "^9.0.0",
74
74
  "tsdown": "0.22.7",
75
- "@better-auth/core": "1.7.0-rc.3",
76
- "better-auth": "1.7.0-rc.3",
77
- "@better-auth/kysely-adapter": "1.7.0-rc.3"
75
+ "better-auth": "1.7.0-rc.4",
76
+ "@better-auth/core": "1.7.0-rc.4",
77
+ "@better-auth/kysely-adapter": "1.7.0-rc.4"
78
78
  },
79
79
  "peerDependencies": {
80
80
  "@better-auth/utils": "0.4.2",
81
81
  "@better-fetch/fetch": "1.3.1",
82
82
  "better-call": "1.3.7",
83
- "@better-auth/core": "^1.7.0-rc.3",
84
- "better-auth": "^1.7.0-rc.3"
83
+ "@better-auth/core": "^1.7.0-rc.4",
84
+ "better-auth": "^1.7.0-rc.4"
85
85
  },
86
86
  "scripts": {
87
87
  "build": "tsdown",