Skip to main content

Changing OAuth Scopes

If you would like to add additional OAuth Scopes when accessing your third party provider, you can do so by adding them to the config when initializing the backend SDK.

For example if you are using Google as your third party provider, you can add an additional scope as follows:

import SuperTokens from "supertokens-node";
import ThirdPartyPasswordless from 'supertokens-node/recipe/thirdpartypasswordless';

SuperTokens.init({
supertokens: {
connectionURI: "...",
},
appInfo: {
apiDomain: "...",
appName: "...",
websiteDomain: "..."
},
recipeList: [
ThirdPartyPasswordless.init({
contactMethod: "EMAIL", // This example will work with any contactMethod
flowType: "USER_INPUT_CODE_AND_MAGIC_LINK", // This example will work with any flowType
providers: [{
config: {
thirdPartyId: "google",
clients: [{
clientSecret: "TODO: GOOGLE_CLIENT_SECRET",
clientId: "TODO: GOOGLE_CLIENT_ID",
scope: [
"scope1",
"scope2",
]
}]
}
}]
})
]
});
Looking for older versions of the documentation?
Which UI do you use?
Custom UI
Pre built UI