From 4146cf3fdab5e75dba68bf19f8e64da019a10694 Mon Sep 17 00:00:00 2001 From: Jonathan Samines Date: Tue, 9 Dec 2025 11:42:50 -0600 Subject: [PATCH] docs(sso): fix default sso docs (#6640) --- docs/content/docs/plugins/sso.mdx | 72 +++++++++++++++++-------------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/docs/content/docs/plugins/sso.mdx b/docs/content/docs/plugins/sso.mdx index 038a5f9e6b..4a3268e059 100644 --- a/docs/content/docs/plugins/sso.mdx +++ b/docs/content/docs/plugins/sso.mdx @@ -649,19 +649,22 @@ organizationProvisioning: { const auth = betterAuth({ plugins: [ sso({ - defaultSSO: { - providerId: "default-saml", // Provider ID for the default provider - samlConfig: { - issuer: "https://your-app.com", - entryPoint: "https://idp.example.com/sso", - cert: "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----", - callbackUrl: "http://localhost:3000/api/auth/sso/saml2/sp/acs", - spMetadata: { - entityID: "http://localhost:3000/api/auth/sso/saml2/sp/metadata", - metadata: "", + defaultSSO: [ + { + providerId: "default-saml", // Provider ID for the default provider + domain: "http://your-app.com", + samlConfig: { + issuer: "https://your-app.com", + entryPoint: "https://idp.example.com/sso", + cert: "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----", + callbackUrl: "http://localhost:3000/api/auth/sso/saml2/sp/acs", + spMetadata: { + entityID: "http://localhost:3000/api/auth/sso/saml2/sp/metadata", + metadata: "", + } } } - } + ] }) ] }); @@ -947,28 +950,31 @@ If you want to allow account linking for specific trusted providers, enable the }, defaultSSO: { description: "Configure a default SSO provider for testing and development. This provider will be used when no matching provider is found in the database.", - type: "object", - properties: { - domain: { - description: "The domain to match for this default provider.", - type: "string", - required: true, - }, - providerId: { - description: "The provider ID to use for the default provider.", - type: "string", - required: true, - }, - samlConfig: { - description: "SAML configuration for the default provider.", - type: "SAMLConfig", - required: false, - }, - oidcConfig: { - description: "OIDC configuration for the default provider.", - type: "OIDCConfig", - required: false, - }, + type: "array", + items: { + type: "object", + properties: { + domain: { + description: "The domain to match for this default provider.", + type: "string", + required: true, + }, + providerId: { + description: "The provider ID to use for the default provider.", + type: "string", + required: true, + }, + samlConfig: { + description: "SAML configuration for the default provider.", + type: "SAMLConfig", + required: false, + }, + oidcConfig: { + description: "OIDC configuration for the default provider.", + type: "OIDCConfig", + required: false, + }, + } }, }, modelName: {