Thirdparty
Built-in providers
Configure single or multi-tenant login/SSO with built-in provider settings.
This page shows a full list of all the built-in providers exposed by SuperTokens.
What is your setup type?
To generate your client ID and secret follow the official documentation. Set the authorisation callback URL to <YOUR_WEBSITE_DOMAIN>/auth/callback/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
To generate your client ID and secret follow this article. Set the authorisation callback URL to <YOUR_WEBSITE_DOMAIN>/auth/callback/apple. Note that Apple doesn't allow localhost in the URL. If you are in dev mode, you can use the dev keys provided above.
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 
    ]
});
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
To generate your client ID and secret follow the official documentation. Set the authorisation callback URL to <YOUR_WEBSITE_DOMAIN>/auth/callback/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 
    ]
});
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/.well-known/openid-configuration",
                        }
                    }
                ]
            }
        }), // initializes signin / sign up features 
    ]
});
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 
    ]
});
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 
    ]
});
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/.well-known/openid-configuration",
                        }
                    }
                ]
            }
        }), // initializes signin / sign up features 
    ]
});
SAML
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 
    ]
});
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/.well-known/openid-configuration",
                        }
                    }
                ]
            }
        }), // initializes signin / sign up features 
    ]
});