supertokens / docs

SuperTokens documentation
39 stars 65 forks source link

Email Change Doc arguments incorrect #734

Closed adriansteffan closed 8 months ago

adriansteffan commented 8 months ago

https://supertokens.com/docs/thirdpartyemailpassword/common-customizations/change-email-post-login#step-2-validate-the-email-and-initiate-the-email-verification-flow

probably has an error, I think this line:

// Now we create and send the email verification link to the user for the new email.
await EmailVerification.sendEmailVerificationEmail(session.getTenantId(), session.getUserId(), email);

should be

// Now we create and send the email verification link to the user for the new email.
await EmailVerification.sendEmailVerificationEmail(session.getTenantId(), session.getUserId(), session.getRecipeUserId(), data.newEmail);

to match the signature of sendEmailVerificationEmail

rishabhpoddar commented 8 months ago

Thanks for finding this. We have fixed it.