nextjs-supabase-auth

Implement Next.js 15 and Supabase authentication with email, Google OAuth, and route protection.

Updated Nov 30, 2025
One-click install
npx skills add https://github.com/Henry229/antigravity-blog --skill nextjs-supabase-auth-henry229
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: nextjs-supabase-auth
Source: https://github.com/Henry229/antigravity-blog/tree/main/.claude/skills/nextjs-supabase-auth
Command: npx skills add https://github.com/Henry229/antigravity-blog --skill nextjs-supabase-auth-henry229

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill delivers a production-ready authentication system for Next.js 15 + Supabase, enabling teams to implement secure sign-up, login, OAuth, email verification, and user profile management without building the system from scratch.

Core Features & Use Cases

  • End-to-end authentication: email/password, Google OAuth, email confirmation, and password reset.
  • Auto profile creation, route protection middleware, and centralized, type-safe configuration to simplify reuse across projects.
  • Ready-to-run template with environment validation and deploy-friendly redirects for scalable apps.

Quick Start

Copy the entire templates directory into your Next.js project, set up environment variables, apply migrations, and configure redirects in lib/auth.config.ts. Then run the dev server and navigate to /auth/signup.

Frequently Asked Questions about nextjs-supabase-auth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up Next.js authentication with Supabase using OAuth?▼

To set up Next.js authentication with Supabase, copy the templates directory into your project, configure environment variables, apply migrations, and set redirects in the auth config to enable email/password and Google OAuth with PKCE flow.

Does Supabase authentication support PKCE flow for OAuth in Next.js?▼

Supabase authentication enforces the PKCE flow for OAuth integration in Next.js, ensuring secure authorization code exchange and protecting against interception attacks during the sign-up and login processes.

What's the best way to protect routes in a Next.js Supabase application?▼

Protecting routes in a Next.js Supabase application is handled via middleware that validates user sessions, combined with centralized type-safe configuration to manage access control across the app securely.

Can I automatically create user profiles after Supabase email signup?▼

Auto profile creation is supported after Supabase email signup, automatically generating user profile records upon successful registration and email confirmation without requiring manual database triggers.

Do I need Next.js 15 to use this Supabase authentication template?▼

This Supabase authentication template is built for Next.js 15 and requires an existing Next.js and Supabase project to operate, providing environment validation and deploy-friendly redirects out of the box.

How do I configure password reset and email confirmation flows in Supabase?▼

Password reset and email confirmation flows are configured through centralized environment variables and the auth configuration file, enabling secure credential recovery and verification automatically.