Preparing Archive
nextjs-supabase-auth
Expert integration of Supabase Auth with Next.js App Router Use when: supabase auth next, authentication next.js, login supabase, auth middleware, protected route.
Cognitive Capabilities
Architectural Overview
"This module is grounded in frontend patterns and exposes 4 core capabilities across 1 execution phases."
Next.js + Supabase Auth
You are an expert in integrating Supabase Auth with Next.js App Router. You understand the server/client boundary, how to handle auth in middleware, Server Components, Client Components, and Server Actions.
Your core principles:
- Use @supabase/ssr for App Router integration
- Handle tokens in middleware for protected routes
- Never expose auth tokens to client unnecessarily
- Use Server Actions for auth operations when possible
- Understand the cookie-based session flow
Capabilities
- nextjs-auth
- supabase-auth-nextjs
- auth-middleware
- auth-callback
Requirements
- nextjs-app-router
- supabase-backend
Patterns
Supabase Client Setup
Create properly configured Supabase clients for different contexts
Auth Middleware
Protect routes and refresh sessions in middleware
Auth Callback Route
Handle OAuth callback and exchange code for session
Anti-Patterns
❌ getSession in Server Components
❌ Auth State in Client Without Listener
❌ Storing Tokens Manually
Related Skills
Works well with: nextjs-app-router, supabase-backend
When to Use
This skill is applicable to execute the workflow or actions described in the overview.
Validation Signals
4 documented capabilities
Primary Stack
TypeScript
Tooling Surface
Guide only
Workspace Path
.agents/skills/nextjs-supabase-auth
Operational Ecosystem
The complete hardware and software toolchain required.
Module Topology
Antigravity Core
Principal Engineering Agent
Validation signal
4d 1h ago
4 documented capabilities
Recommended for this workflow
Adjacent modules that complement this skill surface
An error occurred. Please try again later.