wrnbrd
02/20/2023, 9:59 AMwrnbrd
02/20/2023, 10:02 AMrp_st
02/20/2023, 12:17 PMrp_st
02/20/2023, 12:18 PMwrnbrd
02/20/2023, 8:40 PMwrnbrd
02/21/2023, 9:52 AMPlease call the supertokens.init function before using SuperTokens
rp_st
02/21/2023, 9:53 AMwrnbrd
02/21/2023, 10:03 AMrp_st
02/21/2023, 10:07 AMrp_st
02/21/2023, 10:08 AMrp_st
02/21/2023, 10:08 AMwrnbrd
02/21/2023, 10:11 AMlet Passwordless = require("supertokens-node/recipe/passwordless");
let Session = require("supertokens-node/recipe/session");
is that what you mean?rp_st
02/21/2023, 10:11 AMrp_st
02/21/2023, 10:11 AMwrnbrd
02/21/2023, 10:14 AMasync createCode() {
console.log("create code");
try {
let response = await createCode({
phoneNumber: "###"
});
// Magic link sent successfully.
window.alert("Please check your email for the magic link");
} catch (err) {
if (err.isSuperTokensGeneralError === true) {
// this may be a custom error message sent from the API by you,
// or if the input email / phone number is not valid.
window.alert(err.message);
} else {
window.alert("Oops! Something went wrong.");
}
}
}
wrnbrd
02/21/2023, 10:14 AMrp_st
02/21/2023, 10:14 AMwrnbrd
02/21/2023, 10:15 AMrp_st
02/21/2023, 10:15 AMwrnbrd
02/22/2023, 7:46 AMrp_st
02/22/2023, 7:48 AMrp_st
02/22/2023, 7:49 AM