Skip to content

Commit

Permalink
reset index file
Browse files Browse the repository at this point in the history
  • Loading branch information
Chakravarthy7102 committed Jan 26, 2024
1 parent 0a29736 commit 494bdb5
Showing 1 changed file with 4 additions and 51 deletions.
55 changes: 4 additions & 51 deletions server/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ import EmailVerification from "supertokens-node/recipe/emailverification";
import Passwordless from "supertokens-node/recipe/passwordless";
import Session from "supertokens-node/recipe/session";
import ThirdParty from "supertokens-node/recipe/thirdparty";
import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword";
import ThirdPartyPasswordless from "supertokens-node/recipe/thirdpartypasswordless";
import UserMetaData from "supertokens-node/recipe/usermetadata";
import UserRoles from "supertokens-node/recipe/userroles";

Expand All @@ -38,10 +36,7 @@ app.use(morgan("[:date[iso]] :url :method :status :response-time ms - :res[conte
SuperTokens.init({
framework: "express",
supertokens: {
// connectionURI: "https://st-dev-d771e1f1-9829-11ee-84fe-67fdc165bb46.aws.supertokens.io",
// apiKey: "S7ZFk9nTuTd=2BRpJ8RkeaU-Ud",
connectionURI: "https://st-prod-dd9533d0-9a53-11ee-8a37-b501d662a23d.aws.supertokens.io/",
apiKey: "2ws3Kg6LCPZaIKHl7iiXFNoFDO",
connectionURI: "try.supertokens.com",
},
appInfo: {
appName: "Dashboard Dev Node",
Expand All @@ -51,8 +46,7 @@ SuperTokens.init({
},
recipeList: [
Dashboard.init({
// apiKey: "test",
admins: ["[email protected]"],
apiKey: "test",
// Keep this so that the dev server uses api key based login
override: {
functions: (original) => {
Expand All @@ -67,44 +61,10 @@ SuperTokens.init({
}),
UserMetaData.init(),
// These are initialised so that functionailty works in the node SDK
EmailPassword.init({
// signUpFeature: {
// formFields: [
// {
// id: "email",
// async validate(value, tenantId, userContext) {
// return undefined;
// },
// },
// // {
// // id: "password",
// // async validate(value, tenantId, userContext) {
// // return "NO_PASSWORD";
// // },
// // },
// ],
// },
}),
ThirdPartyEmailPassword.init({}),
EmailPassword.init(),
Passwordless.init({
contactMethod: "EMAIL_OR_PHONE",
flowType: "USER_INPUT_CODE_AND_MAGIC_LINK",
// async validateEmailAddress(email, tenantId) {
// return "PHONE_ERROR";
// },
// async validatePhoneNumber(phoneNumber, tenantId) {
// return "PHONE_ERROR";
// },
}),
ThirdPartyPasswordless.init({
contactMethod: "PHONE",
flowType: "USER_INPUT_CODE_AND_MAGIC_LINK",
// async validatePhoneNumber(phoneNumber, tenantId) {
// return "PHONE_ERROR";
// },
// async validateEmailAddress(phone, tenantId) {
// return "PHONE_ERROR";
// },
}),
ThirdParty.init({
signInAndUpFeature: {
Expand All @@ -128,14 +88,7 @@ SuperTokens.init({
mode: "REQUIRED",
}),
Session.init(),
AccountLinking.init({
async shouldDoAutomaticAccountLinking(newAccountInfo, user, tenantId, userContext) {
return {
shouldAutomaticallyLink: true,
shouldRequireVerification: false,
};
},
}),
AccountLinking.init(),
UserRoles.init(),
],
});
Expand Down

0 comments on commit 494bdb5

Please sign in to comment.