Built in provider config
Below is a list of all built in providers for single or multi tenant login / SSO.
#
Google- Single Tenant
- Multi Tenant
- NodeJS
- GoLang
- Python
- Other Frameworks
Important
import SuperTokens from "supertokens-node";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
providers: [
{
config: {
thirdPartyId: "google",
clients: [{
clientId: "1060725074195-kmeum4crr01uirfl2op9kd5acmi9jutn.apps.googleusercontent.com",
clientSecret: "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",
}]
}
}
]
}), // initializes signin / sign up features
]
});
note
Coming Soon
note
Coming Soon
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
import Multitenancy from "supertokens-node/recipe/multitenancy";
async function addThirdPartyToTenant() {
let resp = await Multitenancy.createOrUpdateThirdPartyConfig("customer1", {
thirdPartyId: "google",
name: "Google",
clients: [{
clientId: "...",
clientSecret: "..."
}]
});
if (resp.createdNew) {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
note
Coming Soon
- Asyncio
- Syncio
note
Coming Soon
note
Coming Soon
- Single app setup
- Multi app setup
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "google",
"name": "Google",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
]
}
}'
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "google",
"name": "Google",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
]
}
}'
#
Google Workspaces- Single Tenant
- Multi Tenant
- NodeJS
- GoLang
- Python
- Other Frameworks
Important
import SuperTokens from "supertokens-node";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
providers: [
{
config: {
thirdPartyId: "google-workspaces",
clients: [{
clientId: "TODO",
clientSecret: "TODO",
additionalConfig: {
"hd": "example.com"
}
}]
}
}
]
}), // initializes signin / sign up features
]
});
note
Coming Soon
note
Coming Soon
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
import Multitenancy from "supertokens-node/recipe/multitenancy";
async function addThirdPartyToTenant() {
let resp = await Multitenancy.createOrUpdateThirdPartyConfig("customer1", {
thirdPartyId: "google-workspaces",
name: "Google Workspaces",
clients: [{
clientId: "...",
clientSecret: "...",
additionalConfig: {
"hd": "example.com",
}
}]
});
if (resp.createdNew) {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
note
Coming Soon
- Asyncio
- Syncio
note
Coming Soon
note
Coming Soon
- Single app setup
- Multi app setup
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "google-workspaces",
"name": "Google Workspaces",
"clients": [
{
"clientId": "...",
"clientSecret": "...",
"additionalConfig": {
"hd": "example.com"
}
}
]
}
}'
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "google-workspaces",
"name": "Google Workspaces",
"clients": [
{
"clientId": "...",
"clientSecret": "...",
"additionalConfig": {
"hd": "example.com"
}
}
]
}
}'
#
Apple- Single Tenant
- Multi Tenant
- NodeJS
- GoLang
- Python
- Other Frameworks
Important
import SuperTokens from "supertokens-node";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
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
]
});
note
Coming Soon
note
Coming Soon
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
import Multitenancy from "supertokens-node/recipe/multitenancy";
async function addThirdPartyToTenant() {
let resp = await Multitenancy.createOrUpdateThirdPartyConfig("customer1", {
thirdPartyId: "apple",
name: "Apple",
clients: [{
clientId: "...",
additionalConfig: {
"keyId": "...",
"privateKey": "...",
"teamId": "...",
}
}]
});
if (resp.createdNew) {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
note
Coming Soon
- Asyncio
- Syncio
note
Coming Soon
note
Coming Soon
- Single app setup
- Multi app setup
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "apple",
"name": "Apple",
"clients": [
{
"clientId": "...",
"additionalConfig": {
"keyId": "...",
"privateKey": "...",
"teamId": "..."
}
}
]
}
}'
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "apple",
"name": "Apple",
"clients": [
{
"clientId": "...",
"additionalConfig": {
"keyId": "...",
"privateKey": "...",
"teamId": "..."
}
}
]
}
}'
#
Discord- Single Tenant
- Multi Tenant
- NodeJS
- GoLang
- Python
- Other Frameworks
Important
import SuperTokens from "supertokens-node";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
providers: [
{
config: {
thirdPartyId: "discord",
clients: [{
clientId: "TODO",
clientSecret: "TODO"
}]
}
}
]
}), // initializes signin / sign up features
]
});
note
Coming Soon
note
Coming Soon
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
import Multitenancy from "supertokens-node/recipe/multitenancy";
async function addThirdPartyToTenant() {
let resp = await Multitenancy.createOrUpdateThirdPartyConfig("customer1", {
thirdPartyId: "discord",
name: "Discord",
clients: [{
clientId: "...",
clientSecret: "...",
}]
});
if (resp.createdNew) {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
note
Coming Soon
- Asyncio
- Syncio
note
Coming Soon
note
Coming Soon
- Single app setup
- Multi app setup
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "discord",
"name": "Discord",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
]
}
}'
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "discord",
"name": "Discord",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
]
}
}'
#
Facebook- Single Tenant
- Multi Tenant
- NodeJS
- GoLang
- Python
- Other Frameworks
Important
import SuperTokens from "supertokens-node";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
providers: [
{
config: {
thirdPartyId: "facebook",
clients: [{
clientId: "TODO",
clientSecret: "TODO"
}]
}
}
]
}), // initializes signin / sign up features
]
});
note
Coming Soon
note
Coming Soon
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
import Multitenancy from "supertokens-node/recipe/multitenancy";
async function addThirdPartyToTenant() {
let resp = await Multitenancy.createOrUpdateThirdPartyConfig("customer1", {
thirdPartyId: "facebook",
name: "Facebook",
clients: [{
clientId: "...",
clientSecret: "...",
}]
});
if (resp.createdNew) {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
note
Coming Soon
- Asyncio
- Syncio
note
Coming Soon
note
Coming Soon
- Single app setup
- Multi app setup
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "facebook",
"name": "Facebook",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
]
}
}'
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "facebook",
"name": "Facebook",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
]
}
}'
#
Github- Single Tenant
- Multi Tenant
- NodeJS
- GoLang
- Python
- Other Frameworks
Important
import SuperTokens from "supertokens-node";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
providers: [
{
config: {
thirdPartyId: "github",
clients: [{
clientId: "TODO",
clientSecret: "TODO"
}]
}
}
]
}), // initializes signin / sign up features
]
});
note
Coming Soon
note
Coming Soon
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
import Multitenancy from "supertokens-node/recipe/multitenancy";
async function addThirdPartyToTenant() {
let resp = await Multitenancy.createOrUpdateThirdPartyConfig("customer1", {
thirdPartyId: "github",
name: "GitHub",
clients: [{
clientId: "...",
clientSecret: "...",
}]
});
if (resp.createdNew) {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
note
Coming Soon
- Asyncio
- Syncio
note
Coming Soon
note
Coming Soon
- Single app setup
- Multi app setup
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "github",
"name": "GitHub",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
]
}
}'
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "github",
"name": "GitHub",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
]
}
}'
#
LinkedIn- Single Tenant
- Multi Tenant
- NodeJS
- GoLang
- Python
- Other Frameworks
Important
import SuperTokens from "supertokens-node";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
providers: [
{
config: {
thirdPartyId: "linkedin",
clients: [{
clientId: "TODO",
clientSecret: "TODO"
}]
}
}
]
}), // initializes signin / sign up features
]
});
note
Coming Soon
note
Coming Soon
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
import Multitenancy from "supertokens-node/recipe/multitenancy";
async function addThirdPartyToTenant() {
let resp = await Multitenancy.createOrUpdateThirdPartyConfig("customer1", {
thirdPartyId: "linkedin",
name: "LinkedIn",
clients: [{
clientId: "...",
clientSecret: "...",
}]
});
if (resp.createdNew) {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
note
Coming Soon
- Asyncio
- Syncio
note
Coming Soon
note
Coming Soon
- Single app setup
- Multi app setup
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "linkedin",
"name": "LinkedIn",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
]
}
}'
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "linkedin",
"name": "LinkedIn",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
]
}
}'
#
Active Directory- Single Tenant
- Multi Tenant
- NodeJS
- GoLang
- Python
- Other Frameworks
Important
import SuperTokens from "supertokens-node";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
providers: [
{
config: {
thirdPartyId: "active-directory",
clients: [{
clientId: "TODO",
clientSecret: "TODO"
}],
oidcDiscoveryEndpoint: "https://login.microsoftonline.com/<directoryId>/v2.0",
}
}
]
}), // initializes signin / sign up features
]
});
note
Coming Soon
note
Coming Soon
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
import Multitenancy from "supertokens-node/recipe/multitenancy";
async function addThirdPartyToTenant() {
let resp = await Multitenancy.createOrUpdateThirdPartyConfig("customer1", {
thirdPartyId: "active-directory",
name: "Active Directory",
clients: [{
clientId: "...",
clientSecret: "...",
}],
oidcDiscoveryEndpoint: "https://login.microsoftonline.com/<directoryId>/v2.0",
});
if (resp.createdNew) {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
note
Coming Soon
- Asyncio
- Syncio
note
Coming Soon
note
Coming Soon
- Single app setup
- Multi app setup
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "active-directoy",
"name": "Active Directory",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
],
"oidcDiscoveryEndpoint": "https://login.microsoftonline.com/<directoryId>/v2.0"
}
}'
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "active-directoy",
"name": "Active Directory",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
],
"oidcDiscoveryEndpoint": "https://login.microsoftonline.com/<directoryId>/v2.0"
}
}'
#
Okta- Single Tenant
- Multi Tenant
- NodeJS
- GoLang
- Python
- Other Frameworks
Important
import SuperTokens from "supertokens-node";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
providers: [
{
config: {
thirdPartyId: "okta",
clients: [{
clientId: "TODO",
clientSecret: "TODO"
}],
oidcDiscoveryEndpoint: "https://dev-<id>.okta.com",
}
}
]
}), // initializes signin / sign up features
]
});
note
Coming Soon
note
Coming Soon
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
import Multitenancy from "supertokens-node/recipe/multitenancy";
async function addThirdPartyToTenant() {
let resp = await Multitenancy.createOrUpdateThirdPartyConfig("customer1", {
thirdPartyId: "okta",
name: "Okta",
clients: [{
clientId: "...",
clientSecret: "...",
}],
oidcDiscoveryEndpoint: "https://dev-<id>.okta.com",
});
if (resp.createdNew) {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
note
Coming Soon
- Asyncio
- Syncio
note
Coming Soon
note
Coming Soon
- Single app setup
- Multi app setup
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "okta",
"name": "Okta",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
],
"oidcDiscoveryEndpoint": "https://dev-<id>.okta.com"
}
}'
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "okta",
"name": "Okta",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
],
"oidcDiscoveryEndpoint": "https://dev-<id>.okta.com"
}
}'
#
Bitbucket- Single Tenant
- Multi Tenant
- NodeJS
- GoLang
- Python
- Other Frameworks
Important
import SuperTokens from "supertokens-node";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
providers: [
{
config: {
thirdPartyId: "bitbucket",
clients: [{
clientId: "TODO",
clientSecret: "TODO"
}],
}
}
]
}), // initializes signin / sign up features
]
});
note
Coming Soon
note
Coming Soon
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
import Multitenancy from "supertokens-node/recipe/multitenancy";
async function addThirdPartyToTenant() {
let resp = await Multitenancy.createOrUpdateThirdPartyConfig("customer1", {
thirdPartyId: "bitbucket",
name: "Bitbucket",
clients: [{
clientId: "...",
clientSecret: "...",
}],
});
if (resp.createdNew) {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
note
Coming Soon
- Asyncio
- Syncio
note
Coming Soon
note
Coming Soon
- Single app setup
- Multi app setup
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "bitbucket",
"name": "Bitbucket",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
],
}
}'
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "bitbucket",
"name": "Bitbucket",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
],
}
}'
#
GitLab- Single Tenant
- Multi Tenant
- NodeJS
- GoLang
- Python
- Other Frameworks
Important
import SuperTokens from "supertokens-node";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
providers: [
{
config: {
thirdPartyId: "gitlab",
clients: [{
clientId: "TODO",
clientSecret: "TODO"
}],
oidcDiscoveryEndpoint: "https://gitlab.example.com",
}
}
]
}), // initializes signin / sign up features
]
});
note
Coming Soon
note
Coming Soon
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
import Multitenancy from "supertokens-node/recipe/multitenancy";
async function addThirdPartyToTenant() {
let resp = await Multitenancy.createOrUpdateThirdPartyConfig("customer1", {
thirdPartyId: "gitlab",
name: "GitLab",
clients: [{
clientId: "...",
clientSecret: "...",
}],
oidcDiscoveryEndpoint: "https://gitlab.example.com",
});
if (resp.createdNew) {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
note
Coming Soon
- Asyncio
- Syncio
note
Coming Soon
note
Coming Soon
- Single app setup
- Multi app setup
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "gitlab",
"name": "GitLab",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
],
"oidcDiscoveryEndpoint": "https://gitlab.example.com"
}
}'
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "gitlab",
"name": "GitLab",
"clients": [
{
"clientId": "...",
"clientSecret": "..."
}
],
"oidcDiscoveryEndpoint": "https://gitlab.example.com"
}
}'
#
SAML login- Single Tenant
- Multi Tenant
- NodeJS
- GoLang
- Python
- Other Frameworks
Important
import SuperTokens from "supertokens-node";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
providers: [
{
config: {
thirdPartyId: "boxy-saml",
clients: [{
clientId: "TODO",
clientSecret: "TODO",
additionalConfig: {
"boxyURL": "<TODO: Example: http://domain.example.com:5225/>"
}
}],
}
}
]
}), // initializes signin / sign up features
]
});
note
Coming Soon
note
Coming Soon
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
import Multitenancy from "supertokens-node/recipe/multitenancy";
async function addThirdPartyToTenant() {
let resp = await Multitenancy.createOrUpdateThirdPartyConfig("customer1", {
thirdPartyId: "boxy-saml",
name: "SAML",
clients: [{
clientId: "...",
clientSecret: "...",
additionalConfig: {
"boxyURL": "<TODO: Example: http://domain.example.com:5225/>",
}
}],
});
if (resp.createdNew) {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
note
Coming Soon
- Asyncio
- Syncio
note
Coming Soon
note
Coming Soon
- Single app setup
- Multi app setup
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "boxy-SAML",
"name": "SAML",
"clients": [
{
"clientId": "...",
"clientSecret": "...",
"additionalConfig": {
"boxyURL": "<TODO: Example: http://domain.example.com:5225/>"
}
}
]
}
}'
curl --location --request PUT '/recipe/multitenancy/config/thirdparty' \
--header 'api-key: ' \
--header 'Content-Type: application/json' \
--data-raw '{
"config": {
"tenantId": "customer1",
"thirdPartyId": "boxy-SAML",
"name": "SAML",
"clients": [
{
"clientId": "...",
"clientSecret": "...",
"additionalConfig": {
"boxyURL": "<TODO: Example: http://domain.example.com:5225/>"
}
}
]
}
}'