Password Reset Email Setup
If password reset emails are not arriving, follow these steps to configure Supabase email settings.
1. Configure Redirect URLs in Supabase
- Go to your Supabase Dashboard
- Navigate to Authentication > URL Configuration
- Under Redirect URLs, add:
http://localhost:3000/auth/reset-password(for local development)https://yourdomain.com/auth/reset-password(for production)
- Click Save
2. Configure Email Provider
Supabase uses its default email service by default, which has rate limits. For production, configure a custom SMTP provider.
Option A: Use Supabase Default (Development Only)
The default email service works for development but has limitations:
- Rate limited (may not send emails if too many requests)
- May go to spam
- Limited customization
Option B: Configure Custom SMTP (Recommended for Production)
- Go to Authentication > Settings > SMTP Settings
- Enable Custom SMTP
- Configure your SMTP provider (Gmail, SendGrid, AWS SES, etc.)
Example SMTP Configuration:
- Host:
smtp.gmail.com(for Gmail) - Port:
587 - Username: Your email address
- Password: App-specific password (not your regular password)
- Sender email: The email address that will send the reset emails
- Sender name: HiveJournal
Option C: Use Resend SMTP (Recommended)
If you're already using Resend for other emails, configure Supabase to use Resend's SMTP service.
Quick Setup:
- Go to Supabase Dashboard → Authentication → Settings → SMTP Settings
- Enable Custom SMTP
- Configure:
- Host:
smtp.resend.com - Port:
587(recommended) or465 - Username:
resend - Password: Your Resend API key (same as
RESEND_API_KEYenv var) - Sender email: Your verified Resend email (e.g.,
noreply@hivejournal.com) - Sender name:
HiveJournal
- Host:
For detailed step-by-step instructions, see RESEND_SMTP_SUPABASE_SETUP.md
3. Customize Email Template
- Go to Authentication > Email Templates
- Select Reset Password template
- Customize the email content
- Make sure the redirect link uses:
{{ .ConfirmationURL }}
Example Template:
Subject: Reset Your Password
Click the link below to reset your password:
{{ .ConfirmationURL }}
This link will expire in 1 hour.
If you didn't request this, please ignore this email.
4. Test Password Reset
- Go to
/auth/forgot-password - Enter your email address
- Check your email inbox (and spam folder)
- Click the reset link
- Set a new password
5. Troubleshooting
Emails Not Arriving
-
Check Supabase Logs:
- Go to Logs > Auth Logs in Supabase Dashboard
- Look for email sending errors
-
Check Email Provider:
- Verify SMTP credentials are correct
- Check if your email provider has rate limits
- Ensure sender email is verified
-
Check Spam Folder:
- Password reset emails often go to spam
- Add the sender to your contacts
-
Rate Limiting:
- Supabase has rate limits on password reset requests
- Wait a few minutes between attempts
- Use custom SMTP to avoid rate limits
-
Redirect URL Issues:
- Ensure redirect URL is whitelisted in Supabase
- Check that the URL matches exactly (including protocol and path)
Common Errors
- "Email rate limit exceeded": Wait a few minutes or configure custom SMTP
- "Invalid redirect URL": Add the URL to Supabase redirect URLs list
- "Email not sent": Check SMTP configuration and logs
6. Development vs Production
Development
- Can use Supabase default email service
- May need to check spam folder
- Rate limits may apply
Production
- Must configure custom SMTP
- Use a verified domain for sender email
- Monitor email delivery rates
- Set up email analytics
7. Security Considerations
- Password reset links expire after 1 hour (default)
- Links can only be used once
- Rate limiting prevents email enumeration attacks
- Always show success message (don't reveal if email exists)