mosamlife
04/10/2024, 12:14 PMmosamlife
04/10/2024, 12:20 PMmosamlife
04/10/2024, 12:22 PMimport ThirdPartyPasswordless from "supertokens-node/recipe/thirdpartypasswordless";
import Session from "supertokens-node/recipe/session";
import { TypeInput } from "supertokens-node/types";
import Dashboard from "supertokens-node/recipe/dashboard";
import UserRoles from "supertokens-node/recipe/userroles";
import EmailVerification from "supertokens-node/recipe/emailverification";
import { SMTPService as EmailVerificationSMTPService } from "supertokens-node/recipe/emailverification/emaildelivery";
export const SuperTokensConfig: TypeInput = {
supertokens: {
// this is the location of the SuperTokens core.
connectionURI: "https://sso.custom.io",
apiKey:
"my-api-key",
},
appInfo: {
appName: "SuperTokens Demo App",
apiDomain: 'http://localhost:3001',
websiteDomain: 'http://localhost:3000',
},
// recipeList contains all the modules that you want to
// use from SuperTokens. See the full list here: https://supertokens.com/docs/guides
recipeList: [
ThirdPartyPasswordless.init({
contactMethod: "EMAIL_OR_PHONE",
flowType: "USER_INPUT_CODE_AND_MAGIC_LINK",
}),
EmailVerification.init({
mode: "REQUIRED",
emailDelivery: {
service: new EmailVerificationSMTPService({
smtpSettings: {
host: "mysmtphost",
authUsername: "awsUserName", // this is optional. In case not given, from.email will be used
password: "aswPassKey",
port: 587,
from: {
name: "Custom Social",
email: "custom@custom.io",
},
secure: true,
},
}),
},
}),
Session.init(),
Dashboard.init(),
UserRoles.init(),
],
};
rp_st
04/10/2024, 1:12 PMrp_st
04/10/2024, 1:12 PMmosamlife
04/10/2024, 3:00 PMrp_st
04/10/2024, 3:01 PMrp_st
04/10/2024, 3:01 PMSuperTokens is an open source authentication solution offering features like: Different types of login: Email / password, Passwordless (OTP or Magic link based).
Powered by