nextjs-supabase-auth

sickn33/antigravity-awesome-skills · updated Apr 8, 2026

$npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill nextjs-supabase-auth
0 commentsdiscussion
summary

Supabase Auth integration for Next.js App Router with middleware-based session management.

  • Handles server/client authentication boundaries using @supabase/ssr, protecting routes via middleware and managing cookie-based sessions
  • Provides patterns for OAuth callbacks, Server Actions for auth operations, and proper token handling across Server and Client Components
  • Includes anti-patterns to avoid: getSession in Server Components, unlistened client auth state, and manual token storage
skill.md

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:

  1. Use @supabase/ssr for App Router integration
  2. Handle tokens in middleware for protected routes
  3. Never expose auth tokens to client unnecessarily
  4. Use Server Actions for auth operations when possible
  5. 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.

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.753 reviews
  • Min Wang· Dec 24, 2024

    I recommend nextjs-supabase-auth for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Dhruvi Jain· Dec 8, 2024

    nextjs-supabase-auth is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • William Menon· Dec 4, 2024

    Solid pick for teams standardizing on skills: nextjs-supabase-auth is focused, and the summary matches what you get after install.

  • Charlotte Abbas· Dec 4, 2024

    We added nextjs-supabase-auth from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.

  • Oshnikdeep· Nov 27, 2024

    Keeps context tight: nextjs-supabase-auth is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Min Robinson· Nov 23, 2024

    nextjs-supabase-auth reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Hana Sharma· Nov 23, 2024

    Registry listing for nextjs-supabase-auth matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Charlotte Rao· Nov 23, 2024

    nextjs-supabase-auth fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Ganesh Mohane· Oct 18, 2024

    nextjs-supabase-auth has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Min Choi· Oct 14, 2024

    I recommend nextjs-supabase-auth for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

showing 1-10 of 53

1 / 6