Fix SuperTokens to use separate ThirdParty and EmailPassword recipes
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import ThirdPartyEmailPasswordNode from "supertokens-node/recipe/thirdpartyemailpassword";
|
||||
import ThirdPartyNode from "supertokens-node/recipe/thirdparty";
|
||||
import EmailPasswordNode from "supertokens-node/recipe/emailpassword";
|
||||
import SessionNode from "supertokens-node/recipe/session";
|
||||
import { TypeInput } from "supertokens-node/types";
|
||||
import { AppInfoUserInput } from "supertokens-node/types";
|
||||
@@ -20,28 +21,31 @@ export const backendConfig = (): TypeInput => {
|
||||
},
|
||||
appInfo,
|
||||
recipeList: [
|
||||
ThirdPartyEmailPasswordNode.init({
|
||||
providers: [
|
||||
{
|
||||
config: {
|
||||
thirdPartyId: "google",
|
||||
clients: [{
|
||||
clientId: process.env.GOOGLE_CLIENT_ID || "",
|
||||
clientSecret: process.env.GOOGLE_CLIENT_SECRET || "",
|
||||
}],
|
||||
ThirdPartyNode.init({
|
||||
signInAndUpFeature: {
|
||||
providers: [
|
||||
{
|
||||
config: {
|
||||
thirdPartyId: "google",
|
||||
clients: [{
|
||||
clientId: process.env.GOOGLE_CLIENT_ID || "",
|
||||
clientSecret: process.env.GOOGLE_CLIENT_SECRET || "",
|
||||
}],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
config: {
|
||||
thirdPartyId: "github",
|
||||
clients: [{
|
||||
clientId: process.env.GITHUB_CLIENT_ID || "",
|
||||
clientSecret: process.env.GITHUB_CLIENT_SECRET || "",
|
||||
}],
|
||||
{
|
||||
config: {
|
||||
thirdPartyId: "github",
|
||||
clients: [{
|
||||
clientId: process.env.GITHUB_CLIENT_ID || "",
|
||||
clientSecret: process.env.GITHUB_CLIENT_SECRET || "",
|
||||
}],
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
}),
|
||||
EmailPasswordNode.init(),
|
||||
SessionNode.init(),
|
||||
],
|
||||
isInServerlessEnv: true,
|
||||
|
||||
Reference in New Issue
Block a user