https://supertokens.com/ logo
#support-questions
Title
# support-questions
b

bill92

02/02/2022, 5:19 AM
Copy code
export const InitializeSupertokens = () =>
  SuperTokens.init({
    framework: 'express',
    supertokens: {
      connectionURI: 'supertokens:3567',
    },
    appInfo: {
      appName: 'tlantli',
      apiDomain: process.env.API_URL as string,
      websiteDomain: process.env.WEB_URL as string,
      apiBasePath: process.env.AUTH_PATH as string,
      websiteBasePath: process.env.AUTH_PATH as string,
    },
    recipeList: [
      Passwordless.init({
        flowType: 'USER_INPUT_CODE',
        contactMethod: 'PHONE',
        createAndSendCustomTextMessage: async (input) => {
          const { phoneNumber, userInputCode } = input;
          client.messages.create({
            body: userInputCode?.toString(),
            from: TWILIO_PHONE_NUMBER,
            to: phoneNumber,
          });
        },
      }),
      Session.init(),
    ],
  });