How do I add authentication to a Next.js app?
Use Supabase Auth with the @supabase/ssr package to add authentication to a Next.js app. It handles sign-up, sign-in, sessions, and social login, and it works with the Next.js App Router’s server components and route handlers.
To see a full flow end to end - a demo app where users can sign up or sign in and then update their account with public profile information - follow Build a User Management App with Next.js or use the Supabase Starter from the Vercel template library.