Do anyone got a tutorial about how setup email verification (at sign-up with credentials) ? I dont know why isnt working :
providers: [
...previous code
EmailProvider({
from: process.env.EMAIL_FROM,
sendVerificationRequest,
})
],
And there is my resend code :
params: SendVerificationRequestParams,
) => {
let { identifier: email, url, provider: { from } } = params;
try {
const resend = new Resend( process.env.RESEND_API_KEY! );
await resend.emails.send({
from: from,
to: email,
subject: 'Login Link to your Account',
html: '<p>Click the magic link below to sign in to your account:</p>\
<p><a href="' + url + '"><b>Sign in</b></a></p>',
});
console.log('Email sent to ' + email + ' with the magic link: ' + url)
} catch (error) {
console.log({ error });
}
};```