From 3167ace0024ebaf1fdf1f92f9ad0290d7c0600c2 Mon Sep 17 00:00:00 2001 From: dannykng Date: Tue, 11 Oct 2022 16:17:50 -0700 Subject: [PATCH] Update install and setup steps --- .../docs/guides/auth/auth-helpers/nextjs.mdx | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/apps/reference/docs/guides/auth/auth-helpers/nextjs.mdx b/apps/reference/docs/guides/auth/auth-helpers/nextjs.mdx index 5c64f4ba60d..33c9458cb73 100644 --- a/apps/reference/docs/guides/auth/auth-helpers/nextjs.mdx +++ b/apps/reference/docs/guides/auth/auth-helpers/nextjs.mdx @@ -24,8 +24,15 @@ This submodule provides convenience helpers for implementing user authentication ```sh npm install @supabase/auth-helpers-nextjs +``` -# Main components and hooks for React based frameworks (optional) +This library supports the following tooling versions: + +- Node.js: `^10.13.0 || >=12.0.0` +- Next.js: `>=10` + +Optionally, install **React Auth Helpers** for components and hooks that can be used across all React-based frameworks. +```sh npm install @supabase/auth-helpers-react ``` @@ -34,26 +41,27 @@ npm install @supabase/auth-helpers-react ```sh yarn add @supabase/auth-helpers-nextjs +``` -# Main components and hooks for React based frameworks (optional) +This library supports the following tooling versions: + +- Node.js: `^10.13.0 || >=12.0.0` +- Next.js: `>=10` + +Optionally, install **React Auth Helpers** for components and hooks that can be used across all React-based frameworks. + +```sh yarn add @supabase/auth-helpers-react ``` -This library supports the following tooling versions: - -- Node.js: `^10.13.0 || >=12.0.0` - -- Next.js: `>=10` - ## Set up environment variables -Set up the following env vars. For local development you can set them in a `.env.local` file. See an [example](https://github.com/supabase/auth-helpers/blob/main/examples/nextjs/.env.local.example). +Retrieve your project URL and anon key in your project's [API settings](https://app.supabase.com/project/_/settings/api) in the Dashboard to set up the following environment variables. For local development you can set them in a `.env.local` file. See an [example](https://github.com/supabase/auth-helpers/blob/main/examples/nextjs/.env.local.example). ```bash -# Find these in your Supabase project settings > API NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key ```