providers/scalekit
ScalekitProfile
The profile returned by Scalekit’s userinfo endpoint.
Extends
Record<string,any>
Indexable
[key: string]: any
Properties
email: string;email_verified
email_verified: boolean;family_name
family_name: string;given_name
given_name: string;name
name: string;oid
oid: string;Organization ID (org_...)
picture
picture: string;sub
sub: string;Unique user ID (usr_...)
default()
function default<P>(options): OIDCConfig<P>Add Scalekit SSO login to your page.
Setup
Callback URL
https://example.com/api/auth/callback/scalekitConfiguration
import { Auth } from "@auth/core"
import Scalekit from "@auth/core/providers/scalekit"
const request = new Request(origin)
const response = await Auth(request, {
providers: [
Scalekit({
clientId: AUTH_SCALEKIT_ID,
clientSecret: AUTH_SCALEKIT_SECRET,
issuer: AUTH_SCALEKIT_ISSUER,
}),
],
})Resources
- Add modular SSO with Scalekit
- Scalekit SSO code samples
- Onboard enterprise customers
- SSO integrations guide
SSO Routing
Scalekit supports multiple ways to route a user to their SSO connection. Pass one of the following optional parameters to target a specific connection:
Scalekit({
clientId: AUTH_SCALEKIT_ID,
clientSecret: AUTH_SCALEKIT_SECRET,
issuer: AUTH_SCALEKIT_ISSUER,
// pick one of the following routing strategies:
connectionId: "conn_...", // exact connection (highest precedence)
organizationId: "org_...", // org's active SSO connection
domain: "acme.com", // resolve org from email domain
})Notes
By default, Auth.js assumes that the Scalekit provider is based on the Open ID Connect specification.
Scalekit is an enterprise SSO platform that supports SAML, OIDC, and social login
(Google, Microsoft, GitHub, etc.) connections. It exposes a single OIDC-compliant
interface, so Auth.js auto-discovers all endpoints from the issuer URL via
/.well-known/openid-configuration — no manual endpoint configuration required.
Each Scalekit environment has a unique issuer URL of the form
https://<subdomain>.scalekit.dev (dev) or https://<subdomain>.scalekit.com (prod).
Set AUTH_SCALEKIT_ISSUER to this URL.
The Scalekit provider comes with a default configuration. To override the defaults for your use case, check out customizing a built-in OAuth provider.
Disclaimer If you think you found a bug in the default configuration, you can open an issue.
Auth.js strictly adheres to the specification and it cannot take responsibility for any deviation from the spec by the provider. You can open an issue, but if the problem is non-compliance with the spec, we might not pursue a resolution. You can ask for more help in Discussions.
Type Parameters
| Type Parameter |
|---|
P extends ScalekitProfile |
Parameters
| Parameter | Type |
|---|---|
options | OAuthUserConfig<P> & { connectionId: string; domain: string; issuer: string; organizationId: string; } |
Returns
OIDCConfig<P>