supertokens/docs

Email Change Doc arguments incorrect

Closed this issue · 1 comments

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

Thanks for finding this. We have fixed it.