apps/docs/content/guides/platform/sso/login-flows.mdx
When configuring SSO for your organization, you can choose between two different login flows: identity provider (IdP)-initiated and service provider (SP)-initiated. Understanding the difference helps you provide the best experience for your users.
<Admonition type="tip" label="Quick decision guide">Most enterprises use IdP-initiated flow for its simplicity and better user experience. Enable SP-initiated only if you need users to start their login journey at supabase.com.
See our Choosing the Right Login Flow guide for use case examples.
</Admonition>With IdP-initiated flow, users start their login journey from your identity provider (Okta, Azure AD, Google Workspace, etc.) and are directly authenticated into Supabase.
User experience:
Key characteristics:
With SP-initiated flow, users start at supabase.com, enter their email address, and are redirected to your identity provider for authentication.
User experience:
Key characteristics:
Best for:
Common scenarios:
Best for:
Common scenarios:
You can enable both flows simultaneously to support different user preferences.
Best for:
IdP-initiated flow is automatically enabled when you configure SSO. No additional steps required.
Users can now access Supabase through your IdP's app catalog.
<Admonition type="note" label="Domain configuration optional">With IdP-initiated flow, you don't need to configure email domains. Your identity provider handles all authentication routing.
</Admonition>To enable SP-initiated flow, you need to configure email domains:
yourcompany.com)company.com, subsidiary.com)Only users with email addresses matching your configured domains can use SP-initiated login. Users with other domains cannot sign in via SSO at supabase.com (but can still use IdP-initiated flow if you configure it in your IdP).
</Admonition>You can change login flow configuration at any time:
Existing users can continue signing in via IdP-initiated flow.
No domain lookup required - The IdP assertion contains all necessary user information.
Domain matching is critical - Without matching domains, users cannot complete SP-initiated flow.
One of the key advantages of IdP-initiated flow is supporting multiple SAML applications under the same domain.
Many enterprises need separate SAML apps for different environments:
With SP-initiated flow only: Each SAML app requires a unique domain. You'd need:
dev.company.comstaging.company.comprod.company.comThis is often impractical since all employees use company.com email addresses.
With IdP-initiated flow: All SAML apps can use the same domain (company.com) because:
Users click the appropriate tile for the environment they need.
<Admonition type="tip">This is the recommended approach for enterprises with multiple environments. Configure each environment as IdP-initiated only (no domains needed).
</Admonition>Yes! Enable SP-initiated login and configure domains. IdP-initiated flow continues to work automatically.
Without domains, only IdP-initiated flow is available. Users cannot start their login at supabase.com.
For IdP-initiated flow: Configure the Supabase ACS URL and entity ID in your IdP. See our provider-specific guides:
For SP-initiated flow: Same configuration, but also ensure your IdP accepts SAML requests from Supabase.
They receive an error message indicating no SSO provider found for their email domain. They can still sign in using password or social auth (if they have a non-SSO account).
Yes, toggle it off at any time. Existing users can continue using IdP-initiated flow.
Both flows are equally secure when properly configured. Security depends on:
See our SSO Testing and Best Practices guide for security recommendations.