Skip to content

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

docs: Update keys in SDK upgrade guides (#45172)

Chris Chinchilla4608b38a0995
diff --git a/apps/docs/docs/ref/dart/upgrade-guide.mdx b/apps/docs/docs/ref/dart/upgrade-guide.mdx
index 2ecc588f7b9..8c777a47e97 100644
--- a/apps/docs/docs/ref/dart/upgrade-guide.mdx
+++ b/apps/docs/docs/ref/dart/upgrade-guide.mdx
@@ -44,7 +44,7 @@ We have brought numerous updates behind the scenes to make the SDK work more int
```dart main.dart
await Supabase.initialize(
url: supabaseUrl,
- anonKey: supabaseKey,
+ publishableKey: publishableKey,
authFlowType: AuthFlowType.pkce,
storageRetryAttempts: 10,
realtimeClientOptions: const RealtimeClientOptions(
@@ -59,7 +59,7 @@ We have brought numerous updates behind the scenes to make the SDK work more int
```dart main.dart
await Supabase.initialize(
url: 'SUPABASE_URL',
- anonKey: 'SUPABASE_ANON_KEY',
+ publishableKey: 'SUPABASE_PUBLISHABLE_KEY',
authOptions: const FlutterAuthClientOptions(
authFlowType: AuthFlowType.pkce,
),
@@ -295,7 +295,7 @@ We have brought numerous updates behind the scenes to make the SDK work more int
```dart
await Supabase.initialize(
url: 'SUPABASE_URL',
- anonKey: 'SUPABASE_ANON_KEY',
+ publishableKey: 'SUPABASE_PUBLISHABLE_KEY',
authFlowType: AuthFlowType.implicit, // set to implicit by default
);
```
@@ -305,7 +305,7 @@ We have brought numerous updates behind the scenes to make the SDK work more int
```dart
await Supabase.initialize(
url: 'SUPABASE_URL',
- anonKey: 'SUPABASE_ANON_KEY',
+ publishableKey: 'SUPABASE_PUBLISHABLE_KEY',
authOptions: FlutterAuthClientOptions(
authFlowType: AuthFlowType.pkce, // set to pkce by default
)
@@ -339,7 +339,7 @@ We have brought numerous updates behind the scenes to make the SDK work more int
```dart
await Supabase.initialize(
url: 'SUPABASE_URL',
- anonKey: 'SUPABASE_ANON_KEY',
+ publishableKey: 'SUPABASE_PUBLISHABLE_KEY',
authCallbackUrlHostname: 'auth-callback',
);
```
@@ -349,7 +349,7 @@ We have brought numerous updates behind the scenes to make the SDK work more int
```dart
await Supabase.initialize(
url: 'SUPABASE_URL',
- anonKey: 'SUPABASE_ANON_KEY',
+ publishableKey: 'SUPABASE_PUBLISHABLE_KEY',
);
```
diff --git a/apps/docs/docs/ref/javascript/typescript-support.mdx b/apps/docs/docs/ref/javascript/typescript-support.mdx
index 6525afa9664..234d127ab7c 100644
--- a/apps/docs/docs/ref/javascript/typescript-support.mdx
+++ b/apps/docs/docs/ref/javascript/typescript-support.mdx
@@ -88,7 +88,7 @@ With TypeScript, `supabase-js` detects things like `not null` constraints and [g
const supabase = createClient<Database>(
process.env.SUPABASE_URL,
- process.env.SUPABASE_ANON_KEY
+ process.env.SUPABASE_PUBLISHABLE_KEY
)
```
diff --git a/apps/docs/docs/ref/javascript/v1/upgrade-guide.mdx b/apps/docs/docs/ref/javascript/v1/upgrade-guide.mdx
index 3c754c40a75..012df19d55e 100644
--- a/apps/docs/docs/ref/javascript/v1/upgrade-guide.mdx
+++ b/apps/docs/docs/ref/javascript/v1/upgrade-guide.mdx
@@ -43,7 +43,7 @@ _Optionally_ if you are using custom configuration with `createClient` then foll
<TabPanel id="1.0x" label="Before">
```ts src/supabaseClient.ts
-const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY, {
+const supabase = createClient(SUPABASE_URL, SUPABASE_PUBLISHABLE_KEY, {
schema: 'custom',
persistSession: false,
})
@@ -53,7 +53,7 @@ const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY, {
<TabPanel id="2.0x" label="After">
```ts src/supabaseClient.ts
-const supabase = createClient(SUPABASE_URL, SUPABASE_ANON_KEY, {
+const supabase = createClient(SUPABASE_URL, SUPABASE_PUBLISHABLE_KEY, {
db: {
schema: 'custom',
},