Skip to main content

If you are using our backend SDK that is lesser than the following versions, please visit the older documentation link here.

Built in provider config

Below is a list of all built in providers for single or multi tenant login / SSO.

Google#

import SuperTokens from "supertokens-node";
import ThirdParty from "supertokens-node/recipe/thirdparty";

SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdParty.init({
signInAndUpFeature: {
providers: [
{
config: {
thirdPartyId: "google",
clients: [{
clientId: "1060725074195-kmeum4crr01uirfl2op9kd5acmi9jutn.apps.googleusercontent.com",
clientSecret: "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",
}]
}
}
]
}
}), // initializes signin / sign up features
]
});

Google Workspaces#

import SuperTokens from "supertokens-node";
import ThirdParty from "supertokens-node/recipe/thirdparty";

SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdParty.init({
signInAndUpFeature: {
providers: [
{
config: {
thirdPartyId: "google-workspaces",
clients: [{
clientId: "TODO",
clientSecret: "TODO",
additionalConfig: {
"hd": "example.com"
}
}]
}
}
]
}
}), // initializes signin / sign up features
]
});

Apple#

import SuperTokens from "supertokens-node";
import ThirdParty from "supertokens-node/recipe/thirdparty";

SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdParty.init({
signInAndUpFeature: {
providers: [
{
config: {
thirdPartyId: "apple",
clients: [{
clientId: "4398792-io.supertokens.example.service",
additionalConfig: {
"keyId": "7M48Y4RYDL",
"privateKey": "-----BEGIN PRIVATE KEY-----\nMIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgu8gXs+XYkqXD6Ala9Sf/iJXzhbwcoG5dMh1OonpdJUmgCgYIKoZIzj0DAQehRANCAASfrvlFbFCYqn3I2zeknYXLwtH30JuOKestDbSfZYxZNMqhF/OzdZFTV0zc5u5s3eN+oCWbnvl0hM+9IW0UlkdA\n-----END PRIVATE KEY-----",
"teamId": "YWQCXGJRJL",
},
}]
}
}
]
}
}), // initializes signin / sign up features
]
});

Discord#

import SuperTokens from "supertokens-node";
import ThirdParty from "supertokens-node/recipe/thirdparty";

SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdParty.init({
signInAndUpFeature: {
providers: [
{
config: {
thirdPartyId: "discord",
clients: [{
clientId: "TODO",
clientSecret: "TODO"
}]
}
}
]
}
}), // initializes signin / sign up features
]
});

Facebook#

import SuperTokens from "supertokens-node";
import ThirdParty from "supertokens-node/recipe/thirdparty";

SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdParty.init({
signInAndUpFeature: {
providers: [
{
config: {
thirdPartyId: "facebook",
clients: [{
clientId: "TODO",
clientSecret: "TODO"
}]
}
}
]
}
}), // initializes signin / sign up features
]
});

Github#

import SuperTokens from "supertokens-node";
import ThirdParty from "supertokens-node/recipe/thirdparty";

SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdParty.init({
signInAndUpFeature: {
providers: [
{
config: {
thirdPartyId: "github",
clients: [{
clientId: "TODO",
clientSecret: "TODO"
}]
}
}
]
}
}), // initializes signin / sign up features
]
});

LinkedIn#

import SuperTokens from "supertokens-node";
import ThirdParty from "supertokens-node/recipe/thirdparty";

SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdParty.init({
signInAndUpFeature: {
providers: [
{
config: {
thirdPartyId: "linkedin",
clients: [{
clientId: "TODO",
clientSecret: "TODO"
}]
}
}
]
}
}), // initializes signin / sign up features
]
});

Twitter#

import SuperTokens from "supertokens-node";
import ThirdParty from "supertokens-node/recipe/thirdparty";

SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdParty.init({
signInAndUpFeature: {
providers: [
{
config: {
thirdPartyId: "twitter",
clients: [{
clientId: "4398792-WXpqVXRiazdRMGNJdEZIa3RVQXc6MTpjaQ",
clientSecret: "BivMbtwmcygbRLNQ0zk45yxvW246tnYnTFFq-LH39NwZMxFpdC"
}]
}
}
]
}
}), // initializes signin / sign up features
]
});

Active Directory#

import SuperTokens from "supertokens-node";
import ThirdParty from "supertokens-node/recipe/thirdparty";

SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdParty.init({
signInAndUpFeature: {
providers: [
{
config: {
thirdPartyId: "active-directory",
clients: [{
clientId: "TODO",
clientSecret: "TODO"
}],
oidcDiscoveryEndpoint: "https://login.microsoftonline.com/<directoryId>/v2.0",
}
}
]
}
}), // initializes signin / sign up features
]
});

Okta#

import SuperTokens from "supertokens-node";
import ThirdParty from "supertokens-node/recipe/thirdparty";

SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdParty.init({
signInAndUpFeature: {
providers: [
{
config: {
thirdPartyId: "okta",
clients: [{
clientId: "TODO",
clientSecret: "TODO"
}],
oidcDiscoveryEndpoint: "https://dev-<id>.okta.com",
}
}
]
}
}), // initializes signin / sign up features
]
});

Bitbucket#

import SuperTokens from "supertokens-node";
import ThirdParty from "supertokens-node/recipe/thirdparty";

SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdParty.init({
signInAndUpFeature: {
providers: [
{
config: {
thirdPartyId: "bitbucket",
clients: [{
clientId: "TODO",
clientSecret: "TODO"
}],
}
}
]
}
}), // initializes signin / sign up features
]
});

GitLab#

import SuperTokens from "supertokens-node";
import ThirdParty from "supertokens-node/recipe/thirdparty";

SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdParty.init({
signInAndUpFeature: {
providers: [
{
config: {
thirdPartyId: "gitlab",
clients: [{
clientId: "TODO",
clientSecret: "TODO"
}],
oidcDiscoveryEndpoint: "https://gitlab.example.com",
}
}
]
}
}), // initializes signin / sign up features
]
});

SAML login#

import SuperTokens from "supertokens-node";
import ThirdParty from "supertokens-node/recipe/thirdparty";

SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdParty.init({
signInAndUpFeature: {
providers: [
{
config: {
thirdPartyId: "boxy-saml",
name: "<provider-name>", // Replace with the correct provider name
clients: [{
clientId: "TODO",
clientSecret: "TODO",
additionalConfig: {
"boxyURL": "<TODO: Example: http://domain.example.com:5225/>"
}
}],
}
}
]
}
}), // initializes signin / sign up features
]
});

To configure SAML login with SuperTokens, ensure that you use the correct provider name in the third-party config. Make sure to replace <provider-name> in the code snippet above with one of the following

  • Microsoft Entra ID
  • Microsoft AD FS
  • Okta
  • Auth0
  • Google
  • OneLogin
  • PingOne
  • JumpCloud
  • Rippling
  • SAML
Looking for older versions of the documentation?
Which UI do you use?
Custom UI
Pre built UI