Secrets, Environment Variables, and Scheduled Functions
Securely manage API keys in Edge Functions with secrets, read environment variables, and run functions on a schedule with cron.
Why Functions Need Secrets
Edge Functions often call third-party APIs that require keys. Hardcoding keys is unsafe, so Supabase provides a secrets manager.
Setting a Secret
Use the CLI to store a secret. It becomes an environment variable inside your functions.
supabase secrets set STRIPE_KEY=sk_live_123All lessons in this course
- Introduction to Edge Functions
- Deploying Your First Function
- Integrating Functions with Your App
- Secrets, Environment Variables, and Scheduled Functions