https://github.com/resend/supabase-auth-hooks-with-resend-templates
https://github.com/resend/supabase-auth-hooks-with-resend-templates
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/resend/supabase-auth-hooks-with-resend-templates
- Owner: resend
- Created: 2025-12-01T17:24:48.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-12-03T20:39:14.000Z (7 months ago)
- Last Synced: 2026-01-19T18:43:51.450Z (5 months ago)
- Language: TypeScript
- Size: 429 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Add the following to .env.local:
```
NEXT_PUBLIC_SUPABASE_URL=https://your-project-id.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
```
Add the following to .env:
```
RESEND_API_KEY=your-resend-api-key
SEND_EMAIL_HOOK_SECRET=your-hook-secret
SENDER_EMAIL=your-sender-email
```
## Push two items to Supabase:
1. env variables
```
supabase secrets set --env-file .env
```
1. send auth emails function
```
supabase functions deploy send-auth-emails --no-verify-jwt`
```
## Add auth hooks to Supabase:
- Enable auth hooks in Supabase dashboard
- Add an HTML webhook
- Generate a secret key
See [Supabase documentation](https://supabase.com/docs/guides/auth/auth-hooks) for auth hooks more information.
## Update .env file
Add the Supabase auth hook secret to the .env file.
Then push the changes to Supabase:
```
supabase secrets set --env-file .env
```