Enable enterprise SSO for any customer in minutes with built-in SAML and OIDC integrations
Enterprise customers often require Single Sign-On (SSO) support for their applications. Rather than building custom integrations for every identity provider—such as Okta, Entra ID, or JumpCloud—and managing the detailed configuration of OIDC and SAML protocols, there are more scalable approaches available.
See a walkthrough of the integrationPlay Review the authentication sequence
After your customer’s identity provider verifies the user, Scalekit forwards the authentication response directly to your application. You receive the verified identity claims and handle all subsequent user management—creating accounts, managing sessions, and controlling access—using your own systems.
This approach gives you maximum flexibility to integrate SSO into existing authentication architectures while offloading the complexity of SAML and OIDC protocol handling to Scalekit.
Modular SSO is designed for applications that maintain their own user database and session management. This lightweight integration focuses solely on identity verification, giving you complete control over user data and authentication flows.
Choose Modular SSO when you:
Want to manage user records in your own database
Prefer to implement custom session management logic
Need to integrate SSO without changing your existing authentication architecture
Already have existing user management infrastructure
<!-- Maven users - add the following to your `pom.xml` -->
<dependency>
<groupId>com.scalekit</groupId>
<artifactId>scalekit-sdk-java</artifactId>
<version>2.0.11</version>
</dependency>
Configure your environment with API credentials. Navigate to Dashboard > Developers > Settings > API credentials and copy these values to your .env file:
.env
SCALEKIT_ENVIRONMENT_URL=<your-environment-url># Example: https://acme.scalekit.dev or https://auth.acme.com (if custom domain is set)
You need to register redirect URL for your application. Go to Scalekit dashboard → Authentication → Redirect URLs and configure:
Allowed callback URLs: The endpoint where users are sent after successful authentication to exchange authorization codes and retrieve profile information. Learn more
Initiate login URL: The endpoint in your app that redirects users to Scalekit’s /authorize endpoint. Required when user starts sign-in directly from their identity provider (IdP-initiated SSO). Learn more
Redirect the users to their enterprise identity provider login page
Create an authorization URL to redirect users to Scalekit’s sign-in page. Use the Scalekit SDK to construct this URL with your redirect URI and required scopes.
scope=openidprofileemail&# Note: "offline_access" scope is not supported in Modular SSO
organization_id=org_15421144869927830&# (Optional) Route by organization
connection_id=conn_15696105471768821&# (Optional) Specific SSO connection
login_hint=user@example.com# (Optional) Extract domain from email
SSO identifiers (choose one or more, evaluated in order of precedence):
connection_id - Direct to specific SSO connection (highest precedence)
organization_id - Route to organization’s SSO
domain_hint - Lookup connection by domain
login_hint - Extract domain from email (lowest precedence). Domain must be registered to the organization (manually via Dashboard or through admin portal when onboarding an enterprise customer)
Enterprise users see their identity provider’s login page. Users verify their identity through the authentication policies set by their organization’s administrator. Post successful verification, the user profile is normalized and sent to your app.
When users start the login process from their identity provider’s portal (rather than your application), this is called IdP-initiated SSO. Scalekit converts these requests to secure SP-initiated flows automatically.
Your initiate login endpoint receives an idp_initiated_login JWT parameter containing the user’s organization and connection details. Decode this token and generate a new authorization URL to complete the authentication flow securely.
This approach provides enhanced security by converting IdP-initiated requests to standard SP-initiated flows, protecting against SAML assertion theft and replay attacks.
After successful authentication, Scalekit redirects to your callback URL with an authorization code. Your application exchanges this code for the user’s profile information and session tokens.
Add a callback endpoint in your application (typically https://your-app.com/auth/callback)
Register it in your Scalekit dashboard > Authentication > Redirect URLS > Allowed Callback URLs
In authentication flow, Scalekit redirects to your callback URL with an authorization code. Your application exchanges this code for the user’s profile information.
Validate your implementation using the IdP Simulator and Test Organization included in your development environment. Test all three scenarios before deploying to production.
Your environment includes a pre-configured test organization (found in Dashboard > Organizations) with domains like @example.com and @example.org for testing.
Pass one of the following connection selectors in your authorization URL:
Email address with @example.com or @example.org domain
Test organization’s connection ID
Organization ID
This opens the SSO login page (IdP Simulator) that simulates your customer’s identity provider login experience.
Many applications already use an authentication provider such as Auth0, Firebase, or AWS Cognito. To enable single sign-on (SSO) using Scalekit, configure Scalekit to work with your current authentication provider.
Enable SSO for your enterprise customers by creating an organization in Scalekit and providing them access to the Admin Portal. Your customers configure their identity provider settings themselves through a self-service portal.
Create an organization for your customer in Dashboard > Organizations, then provide Admin Portal access using one of these methods:
Send this link to your customer’s IT administrator through email, Slack, or your preferred communication channel. They can configure their SSO connection without any developer involvement.
Embed the Admin Portal directly in your application using an iframe:
Customers configure SSO without leaving your application, maintaining a consistent user experience. Listen for UI events from the embedded portal to respond to configuration changes, such as when SSO is enabled or the session expires. See the Admin portal UI events reference for details on handling these events.
Enable domain verification for seamless user experience. Once your customer verifies their domain (e.g., @megacorp.org), users can sign in without selecting their organization. Scalekit automatically routes them to the correct identity provider based on their email domain.
Pre-check SSO availability before redirecting users. This prevents failed redirects when a user’s domain doesn’t have SSO configured: