Skip to content

Commit 0bd8925

Browse files
authored
fix: Use the new envVars property in the shadcn blocks (supabase#37585)
* Search and replace all mentions of SUPABASE_ANON_KEY. * Copy over some comments from the nextjs template. * Bump shadcn version. * Change the building of the blocks to append envVars and docs. * Use the new envVars property in the clients. * Rebuild all blocks. * Fix the wording. * Update the docs.
1 parent d914b81 commit 0bd8925

File tree

66 files changed

+570
-230
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+570
-230
lines changed

apps/ui-library/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Default to local supabase for local development
22
NEXT_PUBLIC_SUPABASE_URL=http://localhost:54321
3-
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
3+
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEY=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0
44
NEXT_PUBLIC_BASE_PATH=/ui
55
NEXT_PUBLIC_API_URL="http://localhost:8080/platform"

apps/ui-library/content/docs/nextjs/client.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ If you've already set up your Supabase client—either using the `npx create-nex
1919

2020
### Getting started
2121

22-
First, add a `.env` file to your project with the following environment variables:
22+
After installing the block, you'll have the following environment variables in your `.env.local` file:
2323

2424
```env
2525
NEXT_PUBLIC_SUPABASE_URL=
26-
NEXT_PUBLIC_SUPABASE_ANON_KEY=
26+
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEY=
2727
```
2828

2929
- If you're using supabase.com, you can find these values in the [Connect modal](https://supabase.com/dashboard/project/_?showConnect=true) under App Frameworks or in your project's [API settings](https://supabase.com/dashboard/project/_/settings/api).

apps/ui-library/content/docs/nextjs/password-based-auth.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ Once you install the block in your Next.js project, you'll get all the necessary
2424

2525
### Getting started
2626

27-
First, add a `.env` file to your project with the following environment variables:
27+
After installing the block, you'll have the following environment variables in your `.env.local` file:
2828

2929
```env
3030
NEXT_PUBLIC_SUPABASE_URL=
31-
NEXT_PUBLIC_SUPABASE_ANON_KEY=
31+
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEY=
3232
```
3333

3434
- If you're using supabase.com, you can find these values in the [Connect modal](https://supabase.com/dashboard/project/_?showConnect=true) under App Frameworks or in your project's [API settings](https://supabase.com/dashboard/project/_/settings/api).

apps/ui-library/content/docs/nextjs/social-auth.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ Once you install the block in your Next.js project, you'll get all the necessary
2626

2727
### Getting started
2828

29-
First, add a `.env` file to your project with the following environment variables:
29+
After installing the block, you'll have the following environment variables in your `.env.local` file:
3030

3131
```env
3232
NEXT_PUBLIC_SUPABASE_URL=
33-
NEXT_PUBLIC_SUPABASE_ANON_KEY=
33+
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_OR_ANON_KEY=
3434
```
3535

3636
- If you're using supabase.com, you can find these values in the [Connect modal](https://supabase.com/dashboard/project/_?showConnect=true) under App Frameworks or in your project's [API settings](https://supabase.com/dashboard/project/_/settings/api).

apps/ui-library/content/docs/react-router/client.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ If you've already set up Supabase clients in your project, you can just continue
1919

2020
### Getting started
2121

22-
First, add a `.env` file to your project with the following environment variables:
22+
After installing the block, you'll have the following environment variables in your `.env.local` file:
2323

2424
```env
2525
VITE_SUPABASE_URL=
26-
VITE_SUPABASE_ANON_KEY=
26+
VITE_SUPABASE_PUBLISHABLE_OR_ANON_KEY=
2727
```
2828

2929
- If you're using supabase.com, you can find these values in the [Connect modal](https://supabase.com/dashboard/project/_?showConnect=true) under App Frameworks or in your project's [API settings](https://supabase.com/dashboard/project/_/settings/api).

apps/ui-library/content/docs/react-router/password-based-auth.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ Once you install the block in your React Router project, you'll get all the nece
2424

2525
### Getting started
2626

27-
First, add a `.env` file to your project with the following environment variables:
27+
After installing the block, you'll have the following environment variables in your `.env.local` file:
2828

2929
```env
3030
VITE_SUPABASE_URL=
31-
VITE_SUPABASE_ANON_KEY=
31+
VITE_SUPABASE_PUBLISHABLE_OR_ANON_KEY=
3232
```
3333

3434
- If you're using supabase.com, you can find these values in the [Connect modal](https://supabase.com/dashboard/project/_?showConnect=true) under App Frameworks or in your project's [API settings](https://supabase.com/dashboard/project/_/settings/api).

apps/ui-library/content/docs/react-router/social-auth.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ Once you install the block in your React Router project, you'll get all the nece
2929

3030
### Getting started
3131

32-
First, add a `.env` file to your project with the following environment variables:
32+
After installing the block, you'll have the following environment variables in your `.env.local` file:
3333

3434
```env
3535
VITE_SUPABASE_URL=
36-
VITE_SUPABASE_ANON_KEY=
36+
VITE_SUPABASE_PUBLISHABLE_OR_ANON_KEY=
3737
```
3838

3939
- If you're using supabase.com, you can find these values in the [Connect modal](https://supabase.com/dashboard/project/_?showConnect=true) under App Frameworks or in your project's [API settings](https://supabase.com/dashboard/project/_/settings/api).

apps/ui-library/content/docs/react/client.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ If you've already set up a Supabase client in your project, you can just continu
1919

2020
### Getting started
2121

22-
First, add a `.env` file to your project with the following environment variables:
22+
After installing the block, you'll have the following environment variables in your `.env.local` file:
2323

2424
```env
2525
VITE_SUPABASE_URL=
26-
VITE_SUPABASE_ANON_KEY=
26+
VITE_SUPABASE_PUBLISHABLE_OR_ANON_KEY=
2727
```
2828

2929
- If you're using supabase.com, you can find these values in the [Connect modal](https://supabase.com/dashboard/project/_?showConnect=true) under App Frameworks or in your project's [API settings](https://supabase.com/dashboard/project/_/settings/api).

apps/ui-library/content/docs/react/password-based-auth.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ Once you install the block in your React project, you'll get all the necessary p
2424

2525
### Getting started
2626

27-
First, add a `.env` file to your project with the following environment variables:
27+
After installing the block, you'll have the following environment variables in your `.env.local` file:
2828

2929
```env
3030
VITE_SUPABASE_URL=
31-
VITE_SUPABASE_ANON_KEY=
31+
VITE_SUPABASE_PUBLISHABLE_OR_ANON_KEY=
3232
```
3333

3434
- If you're using supabase.com, you can find these values in the [Connect modal](https://supabase.com/dashboard/project/_?showConnect=true) under App Frameworks or in your project's [API settings](https://supabase.com/dashboard/project/_/settings/api).

apps/ui-library/content/docs/react/social-auth.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ Once you install the block in your React project, you'll get all the necessary p
2626

2727
### Getting started
2828

29-
First, add a `.env` file to your project with the following environment variables:
29+
After installing the block, you'll have the following environment variables in your `.env.local` file:
3030

3131
```env
3232
VITE_SUPABASE_URL=
33-
VITE_SUPABASE_ANON_KEY=
33+
VITE_SUPABASE_PUBLISHABLE_OR_ANON_KEY=
3434
```
3535

3636
- If you're using supabase.com, you can find these values in the [Connect modal](https://supabase.com/dashboard/project/_?showConnect=true) under App Frameworks or in your project's [API settings](https://supabase.com/dashboard/project/_/settings/api).

0 commit comments

Comments
 (0)