Docs
Email
How to manage emails in this project.
The magic-link feature with Resend works with Auth.js v5!
You can use it in your local environment and in your own production setup.
However, you can't test it on this demo app because I don't want to use the premium Resend plan for this demo.
Steps
Create an account
If don't have an account on Resend, just follow their steps after signup here.
Create an API key
After sign-in on Resend, it prompts you to create your first API key.
Copy/paste in your .env file.
RESEND_API_KEY=re_your_resend_api_key
EMAIL_FROM=login@your-domain.comHow it works in this repo
- Email provider is wired via
auth.config.tsusing Resend (not enabled on Edge runtime). - Magic link emails are rendered with
react-emailinemails/magic-link-email.tsxand sent bylib/email.ts’ssendVerificationRequest. EMAIL_FROMis used as the sender address.
Note: To preview email templates locally, run
pnpm email(Resend preview server). If you hit arenderToReadableStreamerror, see the React Email issue thread for updating the.react-emailfolder.