This repository provides a step-by-step guide on how to set up authentication using Supabase in a Next.js App Router environment. After authenticating, the user's profile data is fetched from the profiles
table in Supabase and stored in an HTTP-only cookie. This enables secure handling of session data on the server and client.
- Supabase authentication using email and password
- Fetching user profile from Supabase's
profiles
table - Storing profile data in a secure HTTP-only cookie
- Accessible user profile data on a protected dashboard route
Before getting started, ensure you have the following tools installed:
- Node.js (v14 or later)
- Next.js (v13 with App Router support)
- Supabase Account
- Clone the repository:
git clone https://github.com/yabenz/next-supabase-auth-cookie