auth: extract reusable sendVerificationEmail utility, enable sendOnSignUp

- Create src/lib/server/email-verification.ts with exported utility function
- Use it in auth.ts sendVerificationEmail callback
- Enable sendOnSignUp so verification email is sent on registration
This commit is contained in:
NeilClack
2026-07-07 08:54:47 -05:00
parent a72b65be95
commit ba83c48b9e
2 changed files with 20 additions and 7 deletions
+15
View File
@@ -0,0 +1,15 @@
import { sendMail } from './resend';
export async function sendVerificationEmail(options: {
email: string;
verificationUrl: string;
}) {
await sendMail({
to: options.email,
templateId: 'email-verification-email',
data: {
target_email_address: options.email,
verification_link: options.verificationUrl
}
});
}