wendytrns
04/11/2024, 11:49 AMreturn {
debug: true,
framework: "custom",
supertokens: {
connectionURI:
process.env.SUPERTOKENS_URI || "https://try.supertokens.com",
apiKey: process.env.SUPERTOKENS_API_KEY,
},
appInfo: appInfo("backend"),
recipeList: [
PasswordlessNode.init({
flowType: "MAGIC_LINK",
contactMethod: "EMAIL",
emailDelivery: {...}
}),
SessionNode.init(),
Dashboard.init(),
UserRoles.init(),
UserMetadata.init(),
],
isInServerlessEnv: true,
};
};
Could somebody help me?rp_st
04/11/2024, 12:25 PMwendytrns
04/11/2024, 1:04 PMrp_st
04/11/2024, 1:35 PMwendytrns
04/11/2024, 1:44 PMrp_st
04/11/2024, 2:16 PMwendytrns
04/11/2024, 3:15 PMrp_st
04/11/2024, 3:16 PMwendytrns
04/11/2024, 3:30 PMrp_st
04/11/2024, 3:37 PMwendytrns
04/11/2024, 3:46 PMexport const backendConfig = (): TypeInput => {
return {
debug: true,
framework: "custom",
supertokens: {
connectionURI: process.env.SUPERTOKENS_URI,
apiKey: process.env.SUPERTOKENS_API_KEY,
},
appInfo: appInfo("backend"),
recipeList: [
PasswordlessNode.init({
flowType: "MAGIC_LINK",
contactMethod: "EMAIL",
}),
SessionNode.init(),
Dashboard.init(),
UserRoles.init(),
UserMetadata.init(),
],
isInServerlessEnv: true,
};
};
And a sign-in/up route with this component :
export default function Auth() {
const [loaded, setLoaded] = useState(false);
useEffect(() => {
if (SuperTokens.canHandleRoute(PreBuiltUIList) === false) {
redirectToAuth({ redirectBack: false });
} else {
setLoaded(true);
}
}, []);
if (loaded) {
return SuperTokens.getRoutingComponent(PreBuiltUIList);
}
return null;
}
Then I'm in front of the component in screenshot. When I enter an email address which is not in the database yet, it does not create a user in my SuperTokens database (which I preview at http://localhost:3000/api/auth/dashboard/
.).rp_st
04/11/2024, 3:46 PMrp_st
04/11/2024, 3:46 PMrp_st
04/11/2024, 3:47 PMwendytrns
04/11/2024, 3:52 PMrp_st
04/11/2024, 3:52 PMrp_st
04/11/2024, 3:53 PMrp_st
04/11/2024, 3:53 PMwendytrns
04/11/2024, 3:54 PMwendytrns
04/11/2024, 3:54 PMrp_st
04/11/2024, 3:54 PMwendytrns
04/11/2024, 3:55 PMwendytrns
04/11/2024, 3:55 PM