Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

docs: Fix Key changes for functions (#38372)

Chris Chinchilla2e7a98f9980d
diff --git a/apps/docs/content/guides/functions/secrets.mdx b/apps/docs/content/guides/functions/secrets.mdx
index 5a7a5ff431a..64bd3223007 100644
--- a/apps/docs/content/guides/functions/secrets.mdx
+++ b/apps/docs/content/guides/functions/secrets.mdx
@@ -10,7 +10,7 @@ subtitle: 'Manage sensitive data securely across environments.'
Edge Functions have access to these secrets by default:
- `SUPABASE_URL`: The API gateway for your Supabase project
-- `SUPABASE_PUBLISHABLE_KEY`: The `publishable` key for your Supabase API. This is safe to use in a browser when you have Row Level Security enabled
+- `SUPABASE_ANON_KEY`: The `anon` key for your Supabase API. This is safe to use in a browser when you have Row Level Security enabled
- `SUPABASE_SERVICE_ROLE_KEY`: The `service_role` key for your Supabase API. This is safe to use in Edge Functions, but it should NEVER be used in a browser. This key will bypass Row Level Security
- `SUPABASE_DB_URL`: The URL for your Postgres database. You can use this to connect directly to your database
@@ -32,7 +32,7 @@ import { createClient } from 'npm:@supabase/supabase-js@2'
// For user-facing operations (respects RLS)
const supabase = createClient(
Deno.env.get('SUPABASE_URL')!,
- Deno.env.get('SUPABASE_PUBLISHABLE_KEY')!
+ Deno.env.get('SUPABASE_ANON_KEY')!
)
// For admin operations (bypasses RLS)