Open Boscop opened 6 months ago
I sort of intentionally left it open for the developer using this starter project to implement email or sms notifications on their own because it's opinionated. You need to decide what provider to use and what you want to include in the email. You also might want to require email verification before you allow access. I added one email example for sending a password reset email via Resend. https://github.com/timothymiller/t4-app/blob/lucia/packages/api/src/auth/user.ts#L205-L223
Ah yeah. Can we add code that sends an email with a verification link if the user signs up with email instead of oauth? :) Since it's very common to have such an email after sign up. (And unnecessary when the user signed up via oauth because that provider already asked them to verify their email address when they signed up there.) I think it would make sense to have this in the lucia branch/template.
(I'm using Resend for now, but the email sending logic could stay the same regardless of the actual provider that people will use.)
Ah yeah. Can we add code that sends an email with a verification link if the user signs up with email instead of oauth? :) Since it's very common to have such an email after sign up. (And unnecessary when the user signed up via oauth because that provider already asked them to verify their email address when they signed up there.) I think it would make sense to have this in the lucia branch/template.
(I'm using Resend for now, but the email sending logic could stay the same regardless of the actual provider that people will use.)
I agree with this. I will implement a PR.
@timothymiller FYI here are the new docs getting created around email verification for lucia v3 - https://v3.lucia-auth.com/guides/email-and-password/email-verification-codes
Currently the user receives no email when signing up successfully. Suggestion: Send email to user after successful sign up.