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 Session from "supertokens-node/recipe/session";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
let { Google, Github, Facebook, Apple } = ThirdParty
TODO
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
signInAndUpFeature: {
providers: [
Google({
clientSecret: "TODO: GOOGLE_CLIENT_SECRET",
clientId: "TODO: GOOGLE_CLIENT_ID"
})
]
}
}), // initializes signin / sign up features
Session.init() // initializes session features
]
});
import (
"github.com/supertokens/supertokens-golang/recipe/thirdpartyemailpassword"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
"github.com/supertokens/supertokens-golang/supertokens"
)
func main() {
supertokens.Init(supertokens.TypeInput{
RecipeList: []supertokens.Recipe{
thirdparty.Init(&tpmodels.TypeInput{
SignInAndUpFeature: tpmodels.TypeInputSignInAndUp{
Providers: []tpmodels.ProviderInput{
{
Config: tpmodels.ProviderConfig{
ThirdPartyId: "google",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "1060725074195-kmeum4crr01uirfl2op9kd5acmi9jutn.apps.googleusercontent.com",
ClientSecret: "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",
},
},
},
},
},
},
}),
},
})
}
from supertokens_python import init, InputAppInfo
from supertokens_python.recipe import thirdpartyemailpassword
from supertokens_python.recipe.thirdparty import Github, Google, Facebook, Apple
TODO
init(
app_info=InputAppInfo(api_domain="...", app_name="...", website_domain="..."),
framework='...',
recipe_list=[
thirdparty.init(
sign_in_and_up_feature=thirdparty.SignInAndUpFeature(providers=[
Google(
client_id='GOOGLE_CLIENT_ID',
client_secret='GOOGLE_CLIENT_SECRET'
)
])
)
]
)
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
TODO
import (
"github.com/supertokens/supertokens-golang/recipe/multitenancy"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
)
func main() {
tenantId := "customer1"
resp, err := multitenancy.CreateOrUpdateThirdPartyConfig(tpmodels.ProviderConfig{
TenantId: &tenantId,
ThirdPartyId: "google",
Name: "Google",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "...",
ClientSecret: "...",
},
},
})
if err != nil {
// handle error
}
if resp.OK.CreatedNew {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
- Asyncio
- Syncio
TODO
TODO
- Single tenant setup
- Multi tenant / 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 Session from "supertokens-node/recipe/session";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
let { Google, Github, Facebook, Apple } = ThirdParty
TODO
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
signInAndUpFeature: {
providers: [
Google({
clientSecret: "TODO: GOOGLE_CLIENT_SECRET",
clientId: "TODO: GOOGLE_CLIENT_ID"
})
]
}
}), // initializes signin / sign up features
Session.init() // initializes session features
]
});
import (
"github.com/supertokens/supertokens-golang/recipe/thirdpartyemailpassword"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
"github.com/supertokens/supertokens-golang/supertokens"
)
func main() {
supertokens.Init(supertokens.TypeInput{
RecipeList: []supertokens.Recipe{
thirdparty.Init(&tpmodels.TypeInput{
SignInAndUpFeature: tpmodels.TypeInputSignInAndUp{
Providers: []tpmodels.ProviderInput{
{
Config: tpmodels.ProviderConfig{
ThirdPartyId: "google-workspaces",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "TODO:",
ClientSecret: "TODO:",
AdditionalConfig: map[string]interface{}{
"hd": "example.com"
}
},
},
},
},
},
},
}),
},
})
}
from supertokens_python import init, InputAppInfo
from supertokens_python.recipe import thirdpartyemailpassword
from supertokens_python.recipe.thirdparty import Github, Google, Facebook, Apple
TODO
init(
app_info=InputAppInfo(api_domain="...", app_name="...", website_domain="..."),
framework='...',
recipe_list=[
thirdparty.init(
sign_in_and_up_feature=thirdparty.SignInAndUpFeature(providers=[
Google(
client_id='GOOGLE_CLIENT_ID',
client_secret='GOOGLE_CLIENT_SECRET'
)
])
)
]
)
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
TODO
import (
"github.com/supertokens/supertokens-golang/recipe/multitenancy"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
)
func main() {
tenantId := "customer1"
resp, err := multitenancy.CreateOrUpdateThirdPartyConfig(tpmodels.ProviderConfig{
TenantId: &tenantId,
ThirdPartyId: "google-workspaces",
Name: "Google Workspaces",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "...",
ClientSecret: "...",
AdditionalConfig: map[string]interface{}{
"hd": "example.com",
}
},
},
})
if err != nil {
// handle error
}
if resp.OK.CreatedNew {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
- Asyncio
- Syncio
TODO
TODO
- Single tenant setup
- Multi tenant / 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 Session from "supertokens-node/recipe/session";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
let { Google, Github, Facebook, Apple } = ThirdParty
TODO
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
signInAndUpFeature: {
providers: [
Google({
clientSecret: "TODO:",
clientId: "TODO:"
})
]
}
}), // initializes signin / sign up features
Session.init() // initializes session features
]
});
import (
"github.com/supertokens/supertokens-golang/recipe/thirdpartyemailpassword"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
"github.com/supertokens/supertokens-golang/supertokens"
)
func main() {
supertokens.Init(supertokens.TypeInput{
RecipeList: []supertokens.Recipe{
thirdparty.Init(&tpmodels.TypeInput{
SignInAndUpFeature: tpmodels.TypeInputSignInAndUp{
Providers: []tpmodels.ProviderInput{
{
Config: tpmodels.ProviderConfig{
ThirdPartyId: "apple",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "4398792-io.supertokens.example.service",
AdditionalConfig: map[string]interface{}{
"keyId": "7M48Y4RYDL",
"privateKey": "-----BEGIN PRIVATE KEY-----\nMIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgu8gXs+XYkqXD6Ala9Sf/iJXzhbwcoG5dMh1OonpdJUmgCgYIKoZIzj0DAQehRANCAASfrvlFbFCYqn3I2zeknYXLwtH30JuOKestDbSfZYxZNMqhF/OzdZFTV0zc5u5s3eN+oCWbnvl0hM+9IW0UlkdA\n-----END PRIVATE KEY-----",
"teamId": "YWQCXGJRJL",
},
},
},
},
},
},
},
}),
},
})
}
from supertokens_python import init, InputAppInfo
from supertokens_python.recipe import thirdpartyemailpassword
from supertokens_python.recipe.thirdparty import Github, Google, Facebook, Apple
TODO
init(
app_info=InputAppInfo(api_domain="...", app_name="...", website_domain="..."),
framework='...',
recipe_list=[
thirdparty.init(
sign_in_and_up_feature=thirdparty.SignInAndUpFeature(providers=[
Google(
client_id='GOOGLE_CLIENT_ID',
client_secret='GOOGLE_CLIENT_SECRET'
)
])
)
]
)
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
TODO
import (
"github.com/supertokens/supertokens-golang/recipe/multitenancy"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
)
func main() {
tenantId := "customer1"
resp, err := multitenancy.CreateOrUpdateThirdPartyConfig(tpmodels.ProviderConfig{
TenantId: &tenantId,
ThirdPartyId: "apple",
Name: "Apple",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "...",
AdditionalConfig: map[string]interface{}{
"keyId": "...",
"privateKey": "...",
"teamId": "...",
}
},
},
})
if err != nil {
// handle error
}
if resp.OK.CreatedNew {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
- Asyncio
- Syncio
TODO
TODO
- Single tenant setup
- Multi tenant / 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 Session from "supertokens-node/recipe/session";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
let { Google, Github, Facebook, Apple } = ThirdParty
TODO
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
signInAndUpFeature: {
providers: [
Google({
clientSecret: "TODO: GOOGLE_CLIENT_SECRET",
clientId: "TODO: GOOGLE_CLIENT_ID"
})
]
}
}), // initializes signin / sign up features
Session.init() // initializes session features
]
});
import (
"github.com/supertokens/supertokens-golang/recipe/thirdpartyemailpassword"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
"github.com/supertokens/supertokens-golang/supertokens"
)
func main() {
supertokens.Init(supertokens.TypeInput{
RecipeList: []supertokens.Recipe{
thirdparty.Init(&tpmodels.TypeInput{
SignInAndUpFeature: tpmodels.TypeInputSignInAndUp{
Providers: []tpmodels.ProviderInput{
{
Config: tpmodels.ProviderConfig{
ThirdPartyId: "discord",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "TODO:",
ClientSecret: "TODO:",
},
},
},
},
},
},
}),
},
})
}
from supertokens_python import init, InputAppInfo
from supertokens_python.recipe import thirdpartyemailpassword
from supertokens_python.recipe.thirdparty import Github, Google, Facebook, Apple
TODO
init(
app_info=InputAppInfo(api_domain="...", app_name="...", website_domain="..."),
framework='...',
recipe_list=[
thirdparty.init(
sign_in_and_up_feature=thirdparty.SignInAndUpFeature(providers=[
Google(
client_id='GOOGLE_CLIENT_ID',
client_secret='GOOGLE_CLIENT_SECRET'
)
])
)
]
)
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
TODO
import (
"github.com/supertokens/supertokens-golang/recipe/multitenancy"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
)
func main() {
tenantId := "customer1"
resp, err := multitenancy.CreateOrUpdateThirdPartyConfig(tpmodels.ProviderConfig{
TenantId: &tenantId,
ThirdPartyId: "discord",
Name: "Discord",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "...",
ClientSecret: "...",
},
},
})
if err != nil {
// handle error
}
if resp.OK.CreatedNew {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
- Asyncio
- Syncio
TODO
TODO
- Single tenant setup
- Multi tenant / 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 Session from "supertokens-node/recipe/session";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
let { Google, Github, Facebook, Apple } = ThirdParty
TODO
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
signInAndUpFeature: {
providers: [
Google({
clientSecret: "TODO: GOOGLE_CLIENT_SECRET",
clientId: "TODO: GOOGLE_CLIENT_ID"
})
]
}
}), // initializes signin / sign up features
Session.init() // initializes session features
]
});
import (
"github.com/supertokens/supertokens-golang/recipe/thirdpartyemailpassword"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
"github.com/supertokens/supertokens-golang/supertokens"
)
func main() {
supertokens.Init(supertokens.TypeInput{
RecipeList: []supertokens.Recipe{
thirdparty.Init(&tpmodels.TypeInput{
SignInAndUpFeature: tpmodels.TypeInputSignInAndUp{
Providers: []tpmodels.ProviderInput{
{
Config: tpmodels.ProviderConfig{
ThirdPartyId: "facebook",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "TODO:",
ClientSecret: "TODO:",
},
},
},
},
},
},
}),
},
})
}
from supertokens_python import init, InputAppInfo
from supertokens_python.recipe import thirdpartyemailpassword
from supertokens_python.recipe.thirdparty import Github, Google, Facebook, Apple
TODO
init(
app_info=InputAppInfo(api_domain="...", app_name="...", website_domain="..."),
framework='...',
recipe_list=[
thirdparty.init(
sign_in_and_up_feature=thirdparty.SignInAndUpFeature(providers=[
Google(
client_id='GOOGLE_CLIENT_ID',
client_secret='GOOGLE_CLIENT_SECRET'
)
])
)
]
)
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
TODO
import (
"github.com/supertokens/supertokens-golang/recipe/multitenancy"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
)
func main() {
tenantId := "customer1"
resp, err := multitenancy.CreateOrUpdateThirdPartyConfig(tpmodels.ProviderConfig{
TenantId: &tenantId,
ThirdPartyId: "facebook",
Name: "Facebook",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "...",
ClientSecret: "...",
},
},
})
if err != nil {
// handle error
}
if resp.OK.CreatedNew {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
- Asyncio
- Syncio
TODO
TODO
- Single tenant setup
- Multi tenant / 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 Session from "supertokens-node/recipe/session";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
let { Google, Github, Facebook, Apple } = ThirdParty
TODO
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
signInAndUpFeature: {
providers: [
Google({
clientSecret: "TODO: GOOGLE_CLIENT_SECRET",
clientId: "TODO: GOOGLE_CLIENT_ID"
})
]
}
}), // initializes signin / sign up features
Session.init() // initializes session features
]
});
import (
"github.com/supertokens/supertokens-golang/recipe/thirdpartyemailpassword"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
"github.com/supertokens/supertokens-golang/supertokens"
)
func main() {
supertokens.Init(supertokens.TypeInput{
RecipeList: []supertokens.Recipe{
thirdparty.Init(&tpmodels.TypeInput{
SignInAndUpFeature: tpmodels.TypeInputSignInAndUp{
Providers: []tpmodels.ProviderInput{
{
Config: tpmodels.ProviderConfig{
ThirdPartyId: "github",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "TODO:",
ClientSecret: "TODO:",
},
},
},
},
},
},
}),
},
})
}
from supertokens_python import init, InputAppInfo
from supertokens_python.recipe import thirdpartyemailpassword
from supertokens_python.recipe.thirdparty import Github, Google, Facebook, Apple
TODO
init(
app_info=InputAppInfo(api_domain="...", app_name="...", website_domain="..."),
framework='...',
recipe_list=[
thirdparty.init(
sign_in_and_up_feature=thirdparty.SignInAndUpFeature(providers=[
Google(
client_id='GOOGLE_CLIENT_ID',
client_secret='GOOGLE_CLIENT_SECRET'
)
])
)
]
)
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
TODO
import (
"github.com/supertokens/supertokens-golang/recipe/multitenancy"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
)
func main() {
tenantId := "customer1"
resp, err := multitenancy.CreateOrUpdateThirdPartyConfig(tpmodels.ProviderConfig{
TenantId: &tenantId,
ThirdPartyId: "github",
Name: "GitHub",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "...",
ClientSecret: "...",
},
},
})
if err != nil {
// handle error
}
if resp.OK.CreatedNew {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
- Asyncio
- Syncio
TODO
TODO
- Single tenant setup
- Multi tenant / 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 Session from "supertokens-node/recipe/session";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
let { Google, Github, Facebook, Apple } = ThirdParty
TODO
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
signInAndUpFeature: {
providers: [
Google({
clientSecret: "TODO: GOOGLE_CLIENT_SECRET",
clientId: "TODO: GOOGLE_CLIENT_ID"
})
]
}
}), // initializes signin / sign up features
Session.init() // initializes session features
]
});
import (
"github.com/supertokens/supertokens-golang/recipe/thirdpartyemailpassword"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
"github.com/supertokens/supertokens-golang/supertokens"
)
func main() {
supertokens.Init(supertokens.TypeInput{
RecipeList: []supertokens.Recipe{
thirdparty.Init(&tpmodels.TypeInput{
SignInAndUpFeature: tpmodels.TypeInputSignInAndUp{
Providers: []tpmodels.ProviderInput{
{
Config: tpmodels.ProviderConfig{
ThirdPartyId: "linkedin",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "TODO:",
ClientSecret: "TODO:",
},
},
},
},
},
},
}),
},
})
}
from supertokens_python import init, InputAppInfo
from supertokens_python.recipe import thirdpartyemailpassword
from supertokens_python.recipe.thirdparty import Github, Google, Facebook, Apple
TODO
init(
app_info=InputAppInfo(api_domain="...", app_name="...", website_domain="..."),
framework='...',
recipe_list=[
thirdparty.init(
sign_in_and_up_feature=thirdparty.SignInAndUpFeature(providers=[
Google(
client_id='GOOGLE_CLIENT_ID',
client_secret='GOOGLE_CLIENT_SECRET'
)
])
)
]
)
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
TODO
import (
"github.com/supertokens/supertokens-golang/recipe/multitenancy"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
)
func main() {
tenantId := "customer1"
resp, err := multitenancy.CreateOrUpdateThirdPartyConfig(tpmodels.ProviderConfig{
TenantId: &tenantId,
ThirdPartyId: "linkedin",
Name: "LinkedIn",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "...",
ClientSecret: "...",
},
},
})
if err != nil {
// handle error
}
if resp.OK.CreatedNew {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
- Asyncio
- Syncio
TODO
TODO
- Single tenant setup
- Multi tenant / 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 Session from "supertokens-node/recipe/session";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
let { Google, Github, Facebook, Apple } = ThirdParty
TODO
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
signInAndUpFeature: {
providers: [
Google({
clientSecret: "TODO: GOOGLE_CLIENT_SECRET",
clientId: "TODO: GOOGLE_CLIENT_ID"
})
]
}
}), // initializes signin / sign up features
Session.init() // initializes session features
]
});
import (
"github.com/supertokens/supertokens-golang/recipe/thirdpartyemailpassword"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
"github.com/supertokens/supertokens-golang/supertokens"
)
func main() {
supertokens.Init(supertokens.TypeInput{
RecipeList: []supertokens.Recipe{
thirdparty.Init(&tpmodels.TypeInput{
SignInAndUpFeature: tpmodels.TypeInputSignInAndUp{
Providers: []tpmodels.ProviderInput{
{
Config: tpmodels.ProviderConfig{
ThirdPartyId: "active-directory",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "TODO:",
ClientSecret: "TODO:",
},
},
OIDCDiscoveryEndpoint: "https://login.microsoftonline.com/<directoryId>/v2.0",
},
},
},
},
}),
},
})
}
from supertokens_python import init, InputAppInfo
from supertokens_python.recipe import thirdpartyemailpassword
from supertokens_python.recipe.thirdparty import Github, Google, Facebook, Apple
TODO
init(
app_info=InputAppInfo(api_domain="...", app_name="...", website_domain="..."),
framework='...',
recipe_list=[
thirdparty.init(
sign_in_and_up_feature=thirdparty.SignInAndUpFeature(providers=[
Google(
client_id='GOOGLE_CLIENT_ID',
client_secret='GOOGLE_CLIENT_SECRET'
)
])
)
]
)
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
TODO
import (
"github.com/supertokens/supertokens-golang/recipe/multitenancy"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
)
func main() {
tenantId := "customer1"
resp, err := multitenancy.CreateOrUpdateThirdPartyConfig(tpmodels.ProviderConfig{
TenantId: &tenantId,
ThirdPartyId: "active-directoy",
Name: "Active Directory",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "...",
ClientSecret: "...",
},
},
OIDCDiscoveryEndpoint: "https://login.microsoftonline.com/<directoryId>/v2.0",
})
if err != nil {
// handle error
}
if resp.OK.CreatedNew {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
- Asyncio
- Syncio
TODO
TODO
- Single tenant setup
- Multi tenant / 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 Session from "supertokens-node/recipe/session";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
let { Google, Github, Facebook, Apple } = ThirdParty
TODO
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
signInAndUpFeature: {
providers: [
Google({
clientSecret: "TODO: GOOGLE_CLIENT_SECRET",
clientId: "TODO: GOOGLE_CLIENT_ID"
})
]
}
}), // initializes signin / sign up features
Session.init() // initializes session features
]
});
import (
"github.com/supertokens/supertokens-golang/recipe/thirdpartyemailpassword"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
"github.com/supertokens/supertokens-golang/supertokens"
)
func main() {
supertokens.Init(supertokens.TypeInput{
RecipeList: []supertokens.Recipe{
thirdparty.Init(&tpmodels.TypeInput{
SignInAndUpFeature: tpmodels.TypeInputSignInAndUp{
Providers: []tpmodels.ProviderInput{
{
Config: tpmodels.ProviderConfig{
ThirdPartyId: "okta",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "TODO:",
ClientSecret: "TODO:",
},
},
OIDCDiscoveryEndpoint: "https://dev-<id>.okta.com",
},
},
},
},
}),
},
})
}
from supertokens_python import init, InputAppInfo
from supertokens_python.recipe import thirdpartyemailpassword
from supertokens_python.recipe.thirdparty import Github, Google, Facebook, Apple
TODO
init(
app_info=InputAppInfo(api_domain="...", app_name="...", website_domain="..."),
framework='...',
recipe_list=[
thirdparty.init(
sign_in_and_up_feature=thirdparty.SignInAndUpFeature(providers=[
Google(
client_id='GOOGLE_CLIENT_ID',
client_secret='GOOGLE_CLIENT_SECRET'
)
])
)
]
)
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
TODO
import (
"github.com/supertokens/supertokens-golang/recipe/multitenancy"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
)
func main() {
tenantId := "customer1"
resp, err := multitenancy.CreateOrUpdateThirdPartyConfig(tpmodels.ProviderConfig{
TenantId: &tenantId,
ThirdPartyId: "okta",
Name: "Okta",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "...",
ClientSecret: "..."
},
},
OIDCDiscoveryEndpoint: "https://dev-<id>.okta.com",
})
if err != nil {
// handle error
}
if resp.OK.CreatedNew {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
- Asyncio
- Syncio
TODO
TODO
- Single tenant setup
- Multi tenant / 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 Session from "supertokens-node/recipe/session";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
let { Google, Github, Facebook, Apple } = ThirdParty
TODO
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
signInAndUpFeature: {
providers: [
Google({
clientSecret: "TODO: GOOGLE_CLIENT_SECRET",
clientId: "TODO: GOOGLE_CLIENT_ID"
})
]
}
}), // initializes signin / sign up features
Session.init() // initializes session features
]
});
import (
"github.com/supertokens/supertokens-golang/recipe/thirdpartyemailpassword"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
"github.com/supertokens/supertokens-golang/supertokens"
)
func main() {
supertokens.Init(supertokens.TypeInput{
RecipeList: []supertokens.Recipe{
thirdparty.Init(&tpmodels.TypeInput{
SignInAndUpFeature: tpmodels.TypeInputSignInAndUp{
Providers: []tpmodels.ProviderInput{
{
Config: tpmodels.ProviderConfig{
ThirdPartyId: "bitbucket",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "TODO:",
ClientSecret: "TODO:",
},
},
},
},
},
},
}),
},
})
}
from supertokens_python import init, InputAppInfo
from supertokens_python.recipe import thirdpartyemailpassword
from supertokens_python.recipe.thirdparty import Github, Google, Facebook, Apple
TODO
init(
app_info=InputAppInfo(api_domain="...", app_name="...", website_domain="..."),
framework='...',
recipe_list=[
thirdparty.init(
sign_in_and_up_feature=thirdparty.SignInAndUpFeature(providers=[
Google(
client_id='GOOGLE_CLIENT_ID',
client_secret='GOOGLE_CLIENT_SECRET'
)
])
)
]
)
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
TODO
import (
"github.com/supertokens/supertokens-golang/recipe/multitenancy"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
)
func main() {
tenantId := "customer1"
resp, err := multitenancy.CreateOrUpdateThirdPartyConfig(tpmodels.ProviderConfig{
TenantId: &tenantId,
ThirdPartyId: "bitbucket",
Name: "Bitbucket",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "...",
ClientSecret: "..."
},
},
})
if err != nil {
// handle error
}
if resp.OK.CreatedNew {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
- Asyncio
- Syncio
TODO
TODO
- Single tenant setup
- Multi tenant / 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 Session from "supertokens-node/recipe/session";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
let { Google, Github, Facebook, Apple } = ThirdParty
TODO
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
signInAndUpFeature: {
providers: [
Google({
clientSecret: "TODO: GOOGLE_CLIENT_SECRET",
clientId: "TODO: GOOGLE_CLIENT_ID"
})
]
}
}), // initializes signin / sign up features
Session.init() // initializes session features
]
});
import (
"github.com/supertokens/supertokens-golang/recipe/thirdpartyemailpassword"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
"github.com/supertokens/supertokens-golang/supertokens"
)
func main() {
supertokens.Init(supertokens.TypeInput{
RecipeList: []supertokens.Recipe{
thirdparty.Init(&tpmodels.TypeInput{
SignInAndUpFeature: tpmodels.TypeInputSignInAndUp{
Providers: []tpmodels.ProviderInput{
{
Config: tpmodels.ProviderConfig{
ThirdPartyId: "gitlab",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "TODO:",
ClientSecret: "TODO:",
},
},
OIDCDiscoveryEndpoint: "https://gitlab.example.com",
},
},
},
},
}),
},
})
}
from supertokens_python import init, InputAppInfo
from supertokens_python.recipe import thirdpartyemailpassword
from supertokens_python.recipe.thirdparty import Github, Google, Facebook, Apple
TODO
init(
app_info=InputAppInfo(api_domain="...", app_name="...", website_domain="..."),
framework='...',
recipe_list=[
thirdparty.init(
sign_in_and_up_feature=thirdparty.SignInAndUpFeature(providers=[
Google(
client_id='GOOGLE_CLIENT_ID',
client_secret='GOOGLE_CLIENT_SECRET'
)
])
)
]
)
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
TODO
import (
"github.com/supertokens/supertokens-golang/recipe/multitenancy"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
)
func main() {
tenantId := "customer1"
resp, err := multitenancy.CreateOrUpdateThirdPartyConfig(tpmodels.ProviderConfig{
TenantId: &tenantId,
ThirdPartyId: "gitlab",
Name: "GitLab",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "...",
ClientSecret: "..."
},
},
OIDCDiscoveryEndpoint: "https://gitlab.example.com",
})
if err != nil {
// handle error
}
if resp.OK.CreatedNew {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
- Asyncio
- Syncio
TODO
TODO
- Single tenant setup
- Multi tenant / 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 Session from "supertokens-node/recipe/session";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
let { Google, Github, Facebook, Apple } = ThirdParty
TODO
SuperTokens.init({
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
supertokens: {
connectionURI: "...",
},
recipeList: [
ThirdPartyEmailPassword.init({
signInAndUpFeature: {
providers: [
Google({
clientSecret: "TODO: GOOGLE_CLIENT_SECRET",
clientId: "TODO: GOOGLE_CLIENT_ID"
})
]
}
}), // initializes signin / sign up features
Session.init() // initializes session features
]
});
import (
"github.com/supertokens/supertokens-golang/recipe/thirdpartyemailpassword"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
"github.com/supertokens/supertokens-golang/supertokens"
)
func main() {
supertokens.Init(supertokens.TypeInput{
RecipeList: []supertokens.Recipe{
thirdparty.Init(&tpmodels.TypeInput{
SignInAndUpFeature: tpmodels.TypeInputSignInAndUp{
Providers: []tpmodels.ProviderInput{
{
Config: tpmodels.ProviderConfig{
ThirdPartyId: "boxy-saml",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "TODO:",
ClientSecret: "TODO:",
AdditionalConfig: map[string]interface{}{
"boxyURL": "<TODO: Example: http://domain.example.com:5225/>"
}
},
},
},
},
},
},
}),
},
})
}
from supertokens_python import init, InputAppInfo
from supertokens_python.recipe import thirdpartyemailpassword
from supertokens_python.recipe.thirdparty import Github, Google, Facebook, Apple
TODO
init(
app_info=InputAppInfo(api_domain="...", app_name="...", website_domain="..."),
framework='...',
recipe_list=[
thirdparty.init(
sign_in_and_up_feature=thirdparty.SignInAndUpFeature(providers=[
Google(
client_id='GOOGLE_CLIENT_ID',
client_secret='GOOGLE_CLIENT_SECRET'
)
])
)
]
)
Call the following function / API to add the third party provider to a specific tenant.
- NodeJS
- GoLang
- Python
- cURL
Important
TODO
import (
"github.com/supertokens/supertokens-golang/recipe/multitenancy"
"github.com/supertokens/supertokens-golang/recipe/thirdparty/tpmodels"
)
func main() {
tenantId := "customer1"
resp, err := multitenancy.CreateOrUpdateThirdPartyConfig(tpmodels.ProviderConfig{
TenantId: &tenantId,
ThirdPartyId: "boxy-saml",
Name: "SAML",
Clients: []tpmodels.ProviderClientConfig{
{
ClientID: "...",
ClientSecret: "...",
AdditionalConfig: map[string]interface{}{
"boxyURL": "<TODO: Example: http://domain.example.com:5225/>",
}
},
},
})
if err != nil {
// handle error
}
if resp.OK.CreatedNew {
// Provider added to customer1
} else {
// Existing provider config overwritten for customer1
}
}
- Asyncio
- Syncio
TODO
TODO
- Single tenant setup
- Multi tenant / 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/>"
}
}
]
}
}'