https://supertokens.com/ logo
email password and email verification question
e

error404

04/27/2023, 1:22 AM
Hello guys, I'm using thirdpartyemailpassword recipe, trying to implement forgot password flow, when function newPasswordEntered is called, it returns error "No instance of EmailPassword found. Make sure to call the EmailPassword.init method." Should I additionally initialize other recipe here? And another question, about email verification, with your provided UI if verification code is expired, user has link to get the new one, how can I access this link to provide it with my custom UI?
r

rp

04/27/2023, 5:36 AM
hey @error404 the function you are using to change the password - which function is that? And what's the import statement for that? You need to make sure that you import from thirdpartyemailpassword and not emailpassword.
About email verification, im not sure what you mean. You will have to rephrase the question
e

error404

04/27/2023, 5:51 AM
When user filled up sing up form successfully, according to your UI he gets message like "Check your email" and also there's link to resend verification email, like in case verification token got expired. And I dont get how could I extract this link to use it with custom UI
r

rp

04/27/2023, 5:54 AM
> And I dont get how could I extract this link to use it with custom UI What does this mean? When the button is clicked, you can call an API which will send the email verification link again - see our docs here: https://supertokens.com/docs/thirdpartyemailpassword/custom-ui/enable-email-verification#step-5-sending-the-email-verification-email
(i assume you are using custom UI)
e

error404

04/27/2023, 5:56 AM
Yes, so in step 6 if I got error about token expiration, I should just call sendEmail again? But in this case I have no info about user
r

rp

04/27/2023, 5:57 AM
you should not send the email again. Instead, you should show the user a UI saying link expired and try again. When they click on try again, show them the same UI which is shown when you send the email verification link
e

error404

04/27/2023, 6:00 AM
Oh, hope I got you right, sorry for disturbing, my bad, another sleeples night to meet deadline