Skip to main content
VibeShare
Back to Instructions
NewFeatured

Auth for Next.js + Supabase

Sign-in, sessions, OAuth, and RLS for real apps

authsupabasenextjsoauthsecurity

What's Included

Step-by-step instructions for authentication on Next.js App Router with Supabase: browser and server clients, middleware, Google/GitHub OAuth, API route guards, and Row Level Security basics. Paste into Claude or Cursor.

Auth Landscape & Threat Model

Compare Supabase, Clerk, Auth.js; minimum security checklist

2KB · .md file

Supabase Auth + App Router

@supabase/ssr clients, env, sign-in, callback, getUser in RSC

3KB · .md file

Middleware & Protected Routes

Session refresh in middleware; matchers; logout

2KB · .md file

OAuth (Google / GitHub)

Provider consoles, redirect URIs, Supabase allowlist, env per environment

2KB · .md file

Server Session & API Guards

Route Handlers with getUser(); service role rules; anti-patterns

2KB · .md file

Supabase RLS Basics

Enable RLS, policies for SELECT/INSERT/UPDATE, verification checklist

2KB · .md file

Bundle Price

$7.00

6 files

Instant download

🎁 First 5 downloads free · No subscription required