0Pricing
Supabase Backend as a Service · Lesson

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_123

All lessons in this course

  1. Introduction to Edge Functions
  2. Deploying Your First Function
  3. Integrating Functions with Your App
  4. Secrets, Environment Variables, and Scheduled Functions
← Back to Supabase Backend as a Service