Resend Email Verification not working.

When user signup on the system using email and password then after successful sign up sendVerificationEmail is send which is good. But when the user sign in without verifying the email then on UI side it send the email not verified which is also good. However, as per the documentation it says that
If you enable require email verification, users must verify their email before they can log in. And every time a user tries to sign in, sendVerificationEmail is called.
If you enable require email verification, users must verify their email before they can log in. And every time a user tries to sign in, sendVerificationEmail is called.
but it does not trigger the sendVerificationEmail hook due to which link is not send, even after login is done without email verified properly.
emailAndPassword: {
enabled: true,
requireEmailVerification: true,
sendResetPassword: async ({ user, url }) => {
await sendEmail({
user,
url,
subject: "Reset your password",
buttonText: "Reset password",
path: "/auth/reset-password",
frontendURI,
resend,
emailFrom,
});
},
},
emailVerification: {
sendVerificationEmail: async ({ user, url }) => {
await sendEmail({
user,
url,
subject: "Verify your email address",
buttonText: "Verify Email",
path: "",
frontendURI,
resend,
emailFrom,
});
},
autoSignInAfterVerification: true,
sendOnSignUp: true,
}
emailAndPassword: {
enabled: true,
requireEmailVerification: true,
sendResetPassword: async ({ user, url }) => {
await sendEmail({
user,
url,
subject: "Reset your password",
buttonText: "Reset password",
path: "/auth/reset-password",
frontendURI,
resend,
emailFrom,
});
},
},
emailVerification: {
sendVerificationEmail: async ({ user, url }) => {
await sendEmail({
user,
url,
subject: "Verify your email address",
buttonText: "Verify Email",
path: "",
frontendURI,
resend,
emailFrom,
});
},
autoSignInAfterVerification: true,
sendOnSignUp: true,
}
No description
1 Reply
bipulmgr
bipulmgrOP21h ago
@admin Please help on this part

Did you find this page helpful?