sheyzi_einstein
06/10/2022, 12:36 PMrp_st
06/10/2022, 12:43 PMrp_st
06/10/2022, 12:43 PMrp_st
06/10/2022, 12:43 PMsheyzi_einstein
06/10/2022, 12:44 PMsupertokens-website
package and I don't know where to initialize it in sveltekitsheyzi_einstein
06/10/2022, 12:45 PMsheyzi_einstein
06/10/2022, 1:00 PMrp_st
06/10/2022, 1:17 PMsheyzi_einstein
06/10/2022, 2:11 PMsheyzi_einstein
06/10/2022, 2:12 PMrp_st
06/10/2022, 2:46 PMsheyzi_einstein
06/10/2022, 3:43 PMsheyzi_einstein
06/10/2022, 3:43 PMrp_st
06/10/2022, 4:10 PMsheyzi_einstein
06/10/2022, 9:20 PMsheyzi_einstein
06/10/2022, 9:20 PMrp_st
06/11/2022, 4:26 AMrp_st
06/11/2022, 5:37 AMrp_st
06/11/2022, 5:38 AMlabel
attribute in the formField array with id: "email"
in signInFeature
on the frontend.
- Override the sign in API on the backend to something like this:
EmailPassword.init({
override: {
functions: (oI) => {
return {
...oI,
signIn: async function (input) {
/**
* Even though we call it input.email,
* it's actually the username of the user since we
* have changed the label on the frontend to ask the user
* to type in their username
*/
let username = input.email;
/**
* This is a function that you need to implement.
*/
let email = await fetchEmailBelongingToUsername(username);
// Now that we have the actual email, we set the input's email to this
// and call the original implementation.
input.email = email;
return oI.signIn(input);
}
}
}
}
})
That's all!