Enterprise SSO
OIDC and SAML 2.0 sign-in per organization.
Returns the SAML metadata for the Service Provider
providerId?stringSAML metadata in XML format
curl -X GET 'https://auth.example.com/api/auth/sso/saml2/sp/metadata'This endpoint is used to register an OIDC provider. This is used to configure the provider and link it to an organization
application/json- body
providerId*stringThe ID of the provider. This is used to identify the provider during login and callback
issuer*stringThe issuer URL of the provider
domain*stringThe domain(s) of the provider. For enterprise multi-domain SSO where a single IdP serves multiple email domains, use comma-separated values (e.g., 'company.com,subsidiary.com,acquired-company.com')
oidcConfig?samlConfig?organizationId?stringIf organization plugin is enabled, the organization id to link the provider to
overrideUserInfo?booleanOverride user info with the provider info. Defaults to false
OIDC provider created successfully
application/json- response
issuer*stringThe issuer URL of the provider
uridomain*stringThe domain of the provider, used for email matching
domainVerified?booleanA boolean indicating whether the domain has been verified or not
domainVerificationToken?stringDomain verification token. It can be used to prove ownership over the SSO domain
oidcConfig*OIDC configuration for the provider
organizationId?stringID of the linked organization, if any
userId*stringID of the user who registered the provider
providerId*stringUnique identifier for the provider
redirectURI*stringThe redirect URI for the provider callback
uricurl -X POST 'https://auth.example.com/api/auth/sso/register' \ -H 'Content-Type: application/json' \ -d '{ "providerId": "string", "issuer": "string", "domain": "string"}'{ "issuer": "http://example.com", "domain": "string", "domainVerified": true, "domainVerificationToken": "string", "oidcConfig": { "issuer": "http://example.com", "pkce": true, "clientId": "string", "clientSecret": "string", "authorizationEndpoint": "http://example.com", "discoveryEndpoint": "http://example.com", "userInfoEndpoint": "http://example.com", "scopes": [ "string" ], "tokenEndpoint": "http://example.com", "tokenEndpointAuthentication": "client_secret_post", "jwksEndpoint": "http://example.com", "mapping": { "email": "string", "emailVerified": "string", "name": "string", "image": "string", "extraFields": { "property1": "string", "property2": "string" } } }, "organizationId": "string", "userId": "string", "providerId": "string", "redirectURI": "http://example.com"}This endpoint is used to sign in with an SSO provider. It redirects to the provider's authorization URL
application/json- body
email?stringThe email address to sign in with. Used to resolve the provider via the email domain; optional if providerId, domain, or organizationSlug is provided.
organizationSlug?stringThe slug of the organization to sign in with.
providerId?stringThe ID of the provider to sign in with. Can be provided instead of email.
domain?stringThe email domain of the provider. Can be provided instead of email.
callbackURL*stringThe URL to redirect to after successful sign-in.
errorCallbackURL?stringThe URL to redirect to if the sign-in flow fails.
newUserCallbackURL?stringThe URL to redirect to after sign-in if the user is newly registered.
scopes?array<string>Scopes to request from the provider.
loginHint?stringLogin hint to send to the identity provider (e.g., email or identifier). If supported, sent as 'login_hint'.
additionalParams?Extra query parameters to append to the OIDC provider authorization URL. RFC 6749 reserved keys (state, client_id, redirect_uri, response_type, code_challenge, code_challenge_method, scope) are rejected. Not supported for SAML providers.
requestSignUp?booleanExplicitly request sign-up. Useful when disableImplicitSignUp is true for this provider.
providerType?stringThe provider protocol to sign in with.
"oidc""saml"Authorization URL generated successfully for SSO sign-in
application/json- response
url*stringThe authorization URL to redirect the user to for SSO sign-in
uriredirect*trueIndicates that the client should redirect to the provided URL
truecurl -X POST 'https://auth.example.com/api/auth/sign-in/sso' \ -H 'Content-Type: application/json' \ -d '{ "callbackURL": "string"}'{ "url": "http://example.com", "redirect": true}This endpoint is used as the callback URL for SSO providers. It handles the authorization code and exchanges it for an access token
providerId*stringcode?stringstate?stringerror?stringerror_description?stringRedirects to the callback URL
curl -X GET 'https://auth.example.com/api/auth/sso/callback/string'Handles SAML responses from IdP after successful authentication. Supports GET for post-auth redirects and POST for SAML response processing.
providerId*stringRelayState?stringRedirects after authentication (success or error with query params)
curl -X GET 'https://auth.example.com/api/auth/sso/saml2/sp/acs/string'Handles SAML responses from IdP after successful authentication. Supports GET for post-auth redirects and POST for SAML response processing.
providerId*stringRelayState?stringapplication/json- body
SAMLResponse*stringRelayState?stringRedirects after authentication (success or error with query params)
curl -X POST 'https://auth.example.com/api/auth/sso/saml2/sp/acs/string' \ -H 'Content-Type: application/json' \ -d '{ "SAMLResponse": "string"}'providerId*stringSAMLRequest?stringSAMLResponse?stringRelayState?stringSigAlg?stringSignature?stringBad Request. Usually due to missing parameters, or invalid parameters.
application/json- response
message*stringcurl -X GET 'https://auth.example.com/api/auth/sso/saml2/sp/slo/string'{ "message": "string"}providerId*stringSAMLRequest?stringSAMLResponse?stringRelayState?stringSigAlg?stringSignature?stringapplication/json- body
SAMLRequest?stringSAMLResponse?stringRelayState?stringSigAlg?stringSignature?stringBad Request. Usually due to missing parameters, or invalid parameters.
application/json- response
message*stringcurl -X POST 'https://auth.example.com/api/auth/sso/saml2/sp/slo/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "message": "string"}providerId*stringapplication/json- body
callbackURL?stringBad Request. Usually due to missing parameters, or invalid parameters.
application/json- response
message*stringcurl -X POST 'https://auth.example.com/api/auth/sso/saml2/logout/string' \ -H 'Content-Type: application/json' \ -d '{}'{ "message": "string"}