--- title: 'Use Supabase Auth with React' subtitle: 'Learn how to use Supabase Auth with React.js.' breadcrumb: 'Auth Quickstarts' hideToc: true --- [Launch a new project](/dashboard) in the Supabase Dashboard. Your new database has a table for storing your users. You can see that this table is currently empty by running some SQL in the [SQL Editor](/dashboard/project/_/sql). ```sql name=SQL_EDITOR select * from auth.users; ```` Create a React app using a [Vite](https://vitejs.dev/guide/) template. ```bash name=Terminal npm create vite@latest my-app -- --template react ``` Navigate to the React app and install the Supabase libraries. ```bash name=Terminal cd my-app && npm install @supabase/supabase-js ``` Rename `.env.example` to `.env.local` and populate with your Supabase connection variables: <$CodeSample path="/auth/quickstarts/react/.env.example" lines={[[1, -1]]} meta="name=.env.local" /> <$Partial path="api_settings_steps.mdx" variables={{ "framework": "react", "tab": "frameworks" }} /> <$Partial path="uiLibCta.mdx" /> In `App.jsx`, create a Supabase client using your Project URL and key. The code uses the [`getClaims`](/docs/reference/javascript/auth-getclaims) method in `App.jsx` to validate the local JWT before showing the signed-in user. <$CodeSample path="/auth/quickstarts/react/src/App.jsx" lines={[[1, -1]]} meta="name=src/App.jsx" /> Before proceeding, change the email template to support a server-side authentication flow that sends a token hash: - Go to the [Auth templates](/dashboard/project/_/auth/templates) page in your dashboard. - Select the Confirm sign up template. - Change `{{ .ConfirmationURL }}` to `{{ .SiteURL }}?token_hash={{ .TokenHash }}&type=email`. - Change your [Site URL](/dashboard/project/_/auth/url-configuration) to `https://localhost:5173` Start the app, go to http://localhost:5173 in a browser, and open the browser console and you should be able to register and log in. ```bash name=Terminal npm run dev ```