Auth Hook for Email Confirmation Not Working - Base64Decoding Error
Issue Summary
I'm trying to set up email confirmation using Supabase Auth Hooks with a custom Edge Function (
Setup Details
User-facing error:
Edge Function logs (most recent):
I'm trying to set up email confirmation using Supabase Auth Hooks with a custom Edge Function (
send-confirmation-email), but getting a persistent hook_timeout error during user signup. The Edge Function logs show: Error: Base64Coder: incorrect characters for decoding when trying to verify the webhook signature.Setup Details
- Auth Hook Configuration
Authentication → Hooks → Send email)- HTTP Method: POST
- HTTP URL:
https://{projectId}.supabase.co/functions/v1/send-confirmation-email - Secret: Generated using "Generate a secret" button (format:
whsec_xxxxxxxxxxxxx) - Events: "Validate" checked
- Auth Provider Configuration
Authentication → Providers → Email)- Email provider enabled
- "Confirm email" enabled
- "Secure email change" enabled
- Edge Function Configuration
Project Settings → Edge Functions)SEND_CONFIRMATION_EMAIL_HOOK_SECRETsecret added- Contains the exact same
whsec_xxxxxxxxxxxxxvalue from Auth Hook configuration - No extra whitespace or line breaks
- Waited 2-3 minutes after updating before testing
- supabase/config.toml
Error Details
User-facing error:
Edge Function logs (most recent):