This is a NextJS/Supabase project showing how to do OAuth sign-in.
This project makes use of:
- Zod Schema Validation library
- Supabase Auth Helpers NextJS
- DaisyUI
- tailwindcss
You can get started with this locally by using the Supabase CLI. Make sure you have the CLI installed before continuing. You can find installation instructions here.
Create a copy of this project using the commands below:
npx degit supabase-community/supabase-by-example/oauth-flow/nextjs project-name
cd project-name
npm install # or pnpm install or yarn install
Edit the supabase/config.toml
file and enable the appropriate third party provider and fill in the credentials by following the guide.
Run the command below to start your local Supabase docker instance
npx supabase start
Copy .env.example
file and rename it .env
. Now copy the credentials you were given when you ran supabase start
into this file.
Now we can start the project dev server:
npm run dev # or yarn dev or pnpm dev
We can now navigate to the /auth/signin
url to sign in.
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.