supertokens / docs

SuperTokens documentation
42 stars 74 forks source link

Email Change Doc arguments incorrect #734

Closed adriansteffan closed 1 year ago

adriansteffan commented 1 year 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 1 year ago

Thanks for finding this. We have fixed it.