Fix API token mapping and add extensive debug logging
- Fixed api_token vs mailketing_api_token column mapping - Added comprehensive debug logging to send-auth-otp - Added fallback logic for missing settings fields - Improved error messages for troubleshooting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
18
deploy-auth-functions.sh
Executable file
18
deploy-auth-functions.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Deploy Auth OTP Edge Functions to Self-Hosted Supabase
|
||||
|
||||
SUPABASE_URL="https://lovable.backoffice.biz.id"
|
||||
SERVICE_ROLE_KEY="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJzdXBhYmFzZSIsImlhdCI6MTc2NjAzNzEyMCwiZXhwIjo0OTIxNzEwNzIwLCJyb2xlIjoic2VydmljZV9yb2xlIn0.t6D9VwaukYGq4c_VbW1bkd3ZkKgldpCKRR13nN14XXc"
|
||||
|
||||
echo "Deploying send-auth-otp..."
|
||||
|
||||
curl -X POST "${SUPABASE_URL}/functions/v1/send-auth-otp" \
|
||||
-H "Authorization: Bearer ${SERVICE_ROLE_KEY}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"user_id":"test","email":"test@test.com"}' \
|
||||
-v
|
||||
|
||||
echo ""
|
||||
echo "If you see a response above, the function is deployed."
|
||||
echo "If you see 404, the function needs to be deployed manually to your Supabase instance."
|
||||
Reference in New Issue
Block a user