@better-auth/sso 1.6.9 → 1.6.11

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-DyoL-0jp.mjs";
1
+ import { t as SSOPlugin } from "./index-DbZYHOJt.mjs";
2
2
 
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-BI7AiK6S.mjs";
1
+ import { t as PACKAGE_VERSION } from "./version-D_ggtAOl.mjs";
2
2
  //#region src/client.ts
3
3
  const ssoClient = (options) => {
4
4
  return {
@@ -716,15 +716,15 @@ declare const updateSSOProvider: (options: SSOOptions) => better_call0.StrictEnd
716
716
  oidcConfig: z.ZodOptional<z.ZodObject<{
717
717
  clientId: z.ZodOptional<z.ZodString>;
718
718
  clientSecret: z.ZodOptional<z.ZodString>;
719
- authorizationEndpoint: z.ZodOptional<z.ZodString>;
720
- tokenEndpoint: z.ZodOptional<z.ZodString>;
721
- userInfoEndpoint: z.ZodOptional<z.ZodString>;
719
+ authorizationEndpoint: z.ZodOptional<z.ZodURL>;
720
+ tokenEndpoint: z.ZodOptional<z.ZodURL>;
721
+ userInfoEndpoint: z.ZodOptional<z.ZodURL>;
722
722
  tokenEndpointAuthentication: z.ZodOptional<z.ZodEnum<{
723
723
  client_secret_post: "client_secret_post";
724
724
  client_secret_basic: "client_secret_basic";
725
725
  }>>;
726
- jwksEndpoint: z.ZodOptional<z.ZodString>;
727
- discoveryEndpoint: z.ZodOptional<z.ZodString>;
726
+ jwksEndpoint: z.ZodOptional<z.ZodURL>;
727
+ discoveryEndpoint: z.ZodOptional<z.ZodURL>;
728
728
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
729
729
  pkce: z.ZodOptional<z.ZodBoolean>;
730
730
  overrideUserInfo: z.ZodOptional<z.ZodBoolean>;
@@ -944,15 +944,15 @@ declare const registerSSOProvider: <O extends SSOOptions>(options: O) => better_
944
944
  oidcConfig: z.ZodOptional<z.ZodObject<{
945
945
  clientId: z.ZodString;
946
946
  clientSecret: z.ZodString;
947
- authorizationEndpoint: z.ZodOptional<z.ZodString>;
948
- tokenEndpoint: z.ZodOptional<z.ZodString>;
949
- userInfoEndpoint: z.ZodOptional<z.ZodString>;
947
+ authorizationEndpoint: z.ZodOptional<z.ZodURL>;
948
+ tokenEndpoint: z.ZodOptional<z.ZodURL>;
949
+ userInfoEndpoint: z.ZodOptional<z.ZodURL>;
950
950
  tokenEndpointAuthentication: z.ZodOptional<z.ZodEnum<{
951
951
  client_secret_post: "client_secret_post";
952
952
  client_secret_basic: "client_secret_basic";
953
953
  }>>;
954
- jwksEndpoint: z.ZodOptional<z.ZodString>;
955
- discoveryEndpoint: z.ZodOptional<z.ZodString>;
954
+ jwksEndpoint: z.ZodOptional<z.ZodURL>;
955
+ discoveryEndpoint: z.ZodOptional<z.ZodURL>;
956
956
  skipDiscovery: z.ZodOptional<z.ZodBoolean>;
957
957
  scopes: z.ZodOptional<z.ZodArray<z.ZodString>>;
958
958
  pkce: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
@@ -1560,7 +1560,7 @@ interface OIDCDiscoveryDocument {
1560
1560
  /**
1561
1561
  * Error codes for OIDC discovery operations.
1562
1562
  */
1563
- type DiscoveryErrorCode = /** Request to discovery endpoint timed out */"discovery_timeout" /** Discovery endpoint returned 404 or similar */ | "discovery_not_found" /** Discovery endpoint returned invalid JSON */ | "discovery_invalid_json" /** Discovery URL is invalid or malformed */ | "discovery_invalid_url" /** Discovery URL is not trusted by the trusted origins configuration */ | "discovery_untrusted_origin" /** Discovery document issuer doesn't match configured issuer */ | "issuer_mismatch" /** Discovery document is missing required fields */ | "discovery_incomplete" /** IdP only advertises token auth methods that Better Auth doesn't currently support */ | "unsupported_token_auth_method" /** Catch-all for unexpected errors */ | "discovery_unexpected_error";
1563
+ type DiscoveryErrorCode = /** Request to discovery endpoint timed out */"discovery_timeout" /** Discovery endpoint returned 404 or similar */ | "discovery_not_found" /** Discovery endpoint returned invalid JSON */ | "discovery_invalid_json" /** OIDC endpoint URL (discovery or per-endpoint: authorization, token, userinfo, jwks) is invalid, malformed, or uses a non-`http(s)` scheme */ | "discovery_invalid_url" /** OIDC endpoint URL is not trusted by the trusted origins configuration */ | "discovery_untrusted_origin" /** OIDC endpoint URL (discovery or per-endpoint) points to a host that is not publicly routable (loopback, RFC 1918, link-local, cloud metadata FQDN, etc.) */ | "discovery_private_host" /** Discovery document issuer doesn't match configured issuer */ | "issuer_mismatch" /** Discovery document is missing required fields */ | "discovery_incomplete" /** IdP only advertises token auth methods that Better Auth doesn't currently support */ | "unsupported_token_auth_method" /** Catch-all for unexpected errors */ | "discovery_unexpected_error";
1564
1564
  /**
1565
1565
  * Custom error class for OIDC discovery failures.
1566
1566
  * Can be caught and mapped to APIError at the edge.
package/dist/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as DataEncryptionAlgorithm, C as TimestampValidationOptions, D as SSOOptions, E as SAMLConfig, M as DigestAlgorithm, N as KeyEncryptionAlgorithm, O as SSOProvider, P as SignatureAlgorithm, S as SAMLConditions, T as OIDCConfig, _ as REQUIRED_DISCOVERY_FIELDS, a as fetchDiscoveryDocument, b as DEFAULT_MAX_SAML_METADATA_SIZE, c as normalizeUrl, d as validateDiscoveryUrl, f as DiscoverOIDCConfigParams, g as OIDCDiscoveryDocument, h as HydratedOIDCConfig, i as discoverOIDCConfig, j as DeprecatedAlgorithmBehavior, k as AlgorithmValidationOptions, l as selectTokenEndpointAuthMethod, m as DiscoveryErrorCode, n as sso, o as needsRuntimeDiscovery, p as DiscoveryError, r as computeDiscoveryUrl, s as normalizeDiscoveryUrls, t as SSOPlugin, u as validateDiscoveryDocument, v as RequiredDiscoveryField, w as validateSAMLTimestamp, x as DEFAULT_MAX_SAML_RESPONSE_SIZE, y as DEFAULT_CLOCK_SKEW_MS } from "./index-DyoL-0jp.mjs";
1
+ import { A as DataEncryptionAlgorithm, C as TimestampValidationOptions, D as SSOOptions, E as SAMLConfig, M as DigestAlgorithm, N as KeyEncryptionAlgorithm, O as SSOProvider, P as SignatureAlgorithm, S as SAMLConditions, T as OIDCConfig, _ as REQUIRED_DISCOVERY_FIELDS, a as fetchDiscoveryDocument, b as DEFAULT_MAX_SAML_METADATA_SIZE, c as normalizeUrl, d as validateDiscoveryUrl, f as DiscoverOIDCConfigParams, g as OIDCDiscoveryDocument, h as HydratedOIDCConfig, i as discoverOIDCConfig, j as DeprecatedAlgorithmBehavior, k as AlgorithmValidationOptions, l as selectTokenEndpointAuthMethod, m as DiscoveryErrorCode, n as sso, o as needsRuntimeDiscovery, p as DiscoveryError, r as computeDiscoveryUrl, s as normalizeDiscoveryUrls, t as SSOPlugin, u as validateDiscoveryDocument, v as RequiredDiscoveryField, w as validateSAMLTimestamp, x as DEFAULT_MAX_SAML_RESPONSE_SIZE, y as DEFAULT_CLOCK_SKEW_MS } from "./index-DbZYHOJt.mjs";
2
2
  export { AlgorithmValidationOptions, DEFAULT_CLOCK_SKEW_MS, DEFAULT_MAX_SAML_METADATA_SIZE, DEFAULT_MAX_SAML_RESPONSE_SIZE, DataEncryptionAlgorithm, DeprecatedAlgorithmBehavior, DigestAlgorithm, DiscoverOIDCConfigParams, DiscoveryError, DiscoveryErrorCode, HydratedOIDCConfig, KeyEncryptionAlgorithm, OIDCConfig, OIDCDiscoveryDocument, REQUIRED_DISCOVERY_FIELDS, RequiredDiscoveryField, SAMLConditions, SAMLConfig, SSOOptions, SSOPlugin, SSOProvider, SignatureAlgorithm, TimestampValidationOptions, computeDiscoveryUrl, discoverOIDCConfig, fetchDiscoveryDocument, needsRuntimeDiscovery, normalizeDiscoveryUrls, normalizeUrl, selectTokenEndpointAuthMethod, sso, validateDiscoveryDocument, validateDiscoveryUrl, validateSAMLTimestamp };