``` export let frontendConfig = () => { return {...
# support-questions
m
Copy code
export let frontendConfig = () => {
  return {
    useReactRouterDom: false,
    appInfo,
    recipeList: [
      ThirdPartyEmailPasswordReact.init({
        signInAndUpFeature: {
          providers: [],
        },
        async getRedirectionURL(context) {
          console.log("> CONTEXT", context)
          if (context.action === "SUCCESS") {
            return "/brand"
          }
        },
        onHandleEvent(context) {
          switch (context.action) {
            case "SUCCESS":
              window.opener?.location.reload()
              window.close()
          }
        },
      }),
      SessionReact.init(),
    ],
  }
}

export let backendConfig = () => {
  return {
    supertokens: {
      connectionURI: process.env.SUPERTOKENS_DOMAIN,
      apiKey: process.env.SUPERTOKENS_API_KEY,
    },
    appInfo,
    recipeList: [
      ThirdPartyEmailPasswordNode.init({
        signUpFeature: {
          handlePostSignUp: async (user) => {
            const { id, email } = user
            try {
              await fetchApi("/api/users/create", { id, email })
            } catch (error) {
              console.log("> Failed to sign up", error)
            }
          },
        },
      }),
      SessionNode.init(),
    ],
    isInServerlessEnv: true,
  }
}