What problem does it solve? Integrating authentication into a Next.js App Router application is error-prone because of the server/client boundary, token refresh in middleware, and cookie-based session handling. This Skill provides expert guidance to wire Supabase Auth correctly across Server Components, Client Components, Server Actions, and middleware. ## Core Features & Use Cases - Supabase Client Setup: Create properly configured Supabase clients for server and client contexts using @supabase/ssr. - Auth Middleware: Protect routes and refresh sessions in Next.js middleware. - Auth Callback Route: Handle OAuth callbacks and exchange authorization codes for sessions. - Anti-Pattern Avoidance: Prevent common mistakes like calling getSession in Server Components or storing tokens manually. - Use Case: You are building a Next.js App Router app that needs login, protected dashboard routes, and OAuth sign-in. Use this Skill to set up the middleware, callback route, and server-side clients correctly on the first attempt. ## Quick Start Set up Supabase Auth in my Next.js App Router project with middleware-protected routes and an OAuth callback handler.