2.6 KiB
2.6 KiB
🔐 Setup Mux Secrets in Supabase
Your Credentials
MUX_TOKEN_ID: 3ceb1723-1274-48ed-bc1d-0ab967f2dda5
MUX_TOKEN_SECRET: kYuAFBuOEiA+XZD8qRfgv6rcLVTJWdOLUTrLhiYagVej8UCRdjSzxOAFpvFQJHePcDd/KhqFXcE
⚡ Quick Setup (2 minutes)
Step 1: Open Supabase Dashboard
Go to: https://supabase.com/dashboard/project/ytoadlpbdguriiccjnip/settings/functions
Step 2: Add Secrets
Look for "Secrets" or "Environment Variables" section.
Click "New secret" or "Add secret" and add:
First Secret:
- Name:
MUX_TOKEN_ID - Value:
3ceb1723-1274-48ed-bc1d-0ab967f2dda5
Second Secret:
- Name:
MUX_TOKEN_SECRET - Value:
kYuAFBuOEiA+XZD8qRfgv6rcLVTJWdOLUTrLhiYagVej8UCRdjSzxOAFpvFQJHePcDd/KhqFXcE
Step 3: Save & Verify
- Click Save or Add
- You should see both secrets listed (values will be hidden)
Step 4: Redeploy Function (if needed)
If the function still doesn't work after adding secrets:
- Go to: https://supabase.com/dashboard/project/ytoadlpbdguriiccjnip/functions
- Find mux-proxy in the list
- Click the ⋮ menu (three dots)
- Select "Redeploy" or "Deploy new version"
✅ Test It
- Go to http://localhost:5173/playground/video-player
- Sign in
- Try uploading a video
- Should work now! 🎉
🔍 Troubleshooting
Still getting "Mux credentials not configured"?
Check #1: Are secrets set?
- Dashboard → Settings → Functions → Secrets
- You should see
MUX_TOKEN_IDandMUX_TOKEN_SECRETlisted
Check #2: Is function deployed?
- Dashboard → Edge Functions
mux-proxyshould show as "Active" or "Deployed"
Check #3: Redeploy
- Sometimes secrets don't update until you redeploy
- Click the ⋮ menu next to mux-proxy → Redeploy
Check #4: Browser console
- Open DevTools (F12)
- Look for detailed error messages
Different error?
Check the browser console and edge function logs:
- Dashboard → Edge Functions → mux-proxy → Logs
📝 Notes
- Local .env file: Only used for local development, NOT for edge functions
- Edge function secrets: Must be set in Supabase Dashboard
- Security: Secrets are encrypted and never exposed to the client
- Updates: If you change secrets, redeploy the function
🎯 Quick Links
- Mux Dashboard: https://dashboard.mux.com
- Supabase Project: https://supabase.com/dashboard/project/ytoadlpbdguriiccjnip
- Edge Functions: https://supabase.com/dashboard/project/ytoadlpbdguriiccjnip/functions
- Function Settings: https://supabase.com/dashboard/project/ytoadlpbdguriiccjnip/settings/functions