auth-supabase-complete
Production-ready Supabase authentication for Next.js 14+ with RLS patterns, session management, OAuth flows, and comprehensive testing.
Skill by JimmyBlanquet
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jimmyblanquet-auth-supabase-complete
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: frontend, backend, testing, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Node.js package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/auth-supabase-complete
What's inside
- Skill name
auth-supabase-complete- Description
- Production-ready Supabase authentication for Next.js 14+ with RLS patterns, session management, OAuth flows, and comprehensive testing. Includes server-side auth helpers, API middleware, and route protection.
- License
- MIT
- Instructions
- 376 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (30)
- PROGRESS.md
- README.md
- SKILL.md
- 01-browser-auth.tsx · examples/
- 02-server-component-auth.tsx · examples/
- 03-api-route-auth.ts · examples/
- 04-admin-api-route.ts · examples/
- 05-middleware.ts · examples/
- 06-social-auth.tsx · examples/
- 07-profile-setup.tsx · examples/
- manifest.yaml
- package-lock.json
- package.json
- MIDDLEWARE_GUIDE.md · references/
- RLS_PATTERNS.md · references/
- auth.ts · src/
- client.ts · src/
- index.ts · src/
- require-auth.ts · src/
- route-matcher.ts · src/
- server.ts · src/
- auth.test.ts · tests/
- client.test.ts · tests/
- auth-flows.test.ts · tests/e2e/
- index.test.ts · tests/
- require-auth.test.ts · tests/
- route-matcher.test.ts · tests/
- server.test.ts · tests/
- tsconfig.json
- vitest.config.ts
SKILL.md (first lines)
# Auth Supabase Complete
Complete Supabase authentication patterns for Next.js applications with server-side rendering, Row Level Security, and production-ready examples.
## When to Use
Use this skill when building Next.js applications that need:
- User authentication (email/password + OAuth)
- Server-side auth with Next.js 14+ App Router
- Row Level Security (RLS) patterns
- Protected API routes with middleware
- Admin/role-based access control
- Session management in middleware
- Profile management
**Don't use this skill if:**
- You're using Next.js Pages Router (this uses App Router only)
- You need a different auth provider (not Supabase)
- You're building a simple static site without auth
## Stack
- Next.js 14+ (App Router)
- Supabase Auth + Database
- TypeScript (strict mode)
- @supabase/ssr (Server-Side Rendering)
- @supabase/supabase-js
- Vitest (testing)
## Quick Start
### 1. Install Dependencies
```bash
npm install @supabase/ssr @supabase/supabase-js
npm install -D @project-forge/auth-supabase-complete
```
### 2. Setup Environment Variables
```bash
NEXT_PUBLIC_SUPABASE_URL=your-project-url
NEXT_PUBLIC_SUPABASE_ANON_KEY=your-anon-key
SUPABASE_SERVICE_ROLE_KEY=your-service-role-key # For admin operations
```
### 3. Create Configuration
```typescript
// lib/config.ts
export const supabaseConfig = {
supabaseUrl: process.env.NEXT_PUBLIC_SUPABASE_URL!,
supabaseAnonKey: process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY!,
}
```
### 4. Use in Server Components
```typescript
import { getUser } from '@project-forge/auth-supabase-complete/auth'
import { supabaseConfig } from '@/lib/config'
export default async function DashboardPage() {
const user = await getUser(supabaseConfig)
if (!user) redirect('/auth/login')
return <div>Welcome {user.email}</div>
}
```
### 5. Protect API Routes
```typescript
import { requireAuth } from '@project-forge/auth-supabase-complete/require-auth'
import { supabaseConfig } from '@/lib/config'
export async function GET(request: NextRequest) {
const { user, error, supabase } = await requireAuth(supabaseConfig, request)
if (error) return error // 401 Unauthorized
// Use authenticated supabase client with RLS
const { data } = await supabase.from('posts').select('*')
return NextResponse.json({ data })
}
```
## Key Features
### Three Server Clients
The skill provides three types of Supabase clients for different Next.js contexts:
1. **Server Component Client** - Uses `cookies()` from `next/headers`
```typescript
import { createClient } from '@project-forge/auth-supabase-complete/server'
const supabase = await createClient(config)
```
2. **Route Handler Client** - Uses `NextRequest` cookies
```typescript
import { createRouteHandlerClient } from '@project-forge/auth-supabase-complete/server'
const supabase = createRouteHandlerClient(config, request, response)
```
3. **Service Role Client** - Bypasses RLS for admin operations
```typescript
import { createServiceClient } from '@project-forge/auth-supabase-complete/server'
const supabase = createServiceClient(config)
```
### Auth Utilities
Five helper functions for common auth operations:
- `signOut(config, redirectUrl?)` - Sign out with redirect
- `getUser(config)` - Get current authenticated user
- `getProfile<T>(config, tableName?)` - Fetch user profileFrom JimmyBlanquet/project-forge, MIT.
More from JimmyBlanquet/project-forge
- 0.479score
ralph-agent-teams
JimmyBlanquet
Parallel implementation of Ralph++ PRD sub-stories using Claude Opus 4.6 Agent Teams.
SkillCFreshness: CClaude Code +9 - 0.476score
context-maximizer
JimmyBlanquet
Exploit the 1M token context (Opus 4.6 / Sonnet 4.6) for full codebase awareness in SpecKit.
SkillCFreshness: CClaude Code +9 - 0.476score
email-oauth-flows
JimmyBlanquet
Production-ready Gmail and Outlook OAuth integration for Next.js with Supabase.
SkillCFreshness: CClaude Code +9 - 0.474score
ralph-loop
JimmyBlanquet
Use when implementing features autonomously from a prd.json, spawning fresh Task agents per story with quality gates and atomic commits
SkillCFreshness: CClaude Code +9 - 0.474score
dev-pilot
JimmyBlanquet
Full autonomous pipeline orchestrator that loops over features.json and executes the complete development cycle for each feature: spec → plan → tasks →…
SkillCFreshness: CClaude Code +9 - 0.472score
effort-optimizer
JimmyBlanquet
Optimize API costs by adjusting thinking effort per task type.
SkillCFreshness: CClaude Code +9 - 0.471score
config-centralization
JimmyBlanquet
Type-safe, environment-aware configuration management for Next.js/TypeScript applications using a singleton pattern with runtime validation.
SkillCFreshness: CClaude Code +9 - 0.471score
ai-multi-provider
JimmyBlanquet
Multi-provider LLM orchestration system with intelligent routing, fallback chains, cost optimization, and automatic observability.
SkillCFreshness: CClaude Code +9 - 0.471score
logging-structured
JimmyBlanquet
Structured logging with typed contexts for Next.js applications.
SkillCFreshness: CClaude Code +9 - 0.471score
rate-limiting-persistent
JimmyBlanquet
Persistent rate limiting using PostgreSQL for atomic counters.
SkillCFreshness: CClaude Code +9 - 0.470score
speckit-archi-review
JimmyBlanquet
Run an architecture audit on the current project to detect drift, layer violations, ADR non-compliance, and technical debt.
SkillCFreshness: CClaude Code +9 - 0.469score
railway-integration
JimmyBlanquet
Railway deployment configuration for backend services and databases.
SkillCFreshness: CClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 2
- Last commit (this folder)
- May 10, 2026 (5 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/JimmyBlanquet/project-forge
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from JimmyBlanquet
- 0.479score
ralph-agent-teams
JimmyBlanquet
Parallel implementation of Ralph++ PRD sub-stories using Claude Opus 4.6 Agent Teams.
SkillCFreshness: CClaude Code +9 - 0.476score
context-maximizer
JimmyBlanquet
Exploit the 1M token context (Opus 4.6 / Sonnet 4.6) for full codebase awareness in SpecKit.
SkillCFreshness: CClaude Code +9 - 0.476score
email-oauth-flows
JimmyBlanquet
Production-ready Gmail and Outlook OAuth integration for Next.js with Supabase.
SkillCFreshness: CClaude Code +9 - 0.474score
dev-pilot
JimmyBlanquet
Full autonomous pipeline orchestrator that loops over features.json and executes the complete development cycle for each feature: spec → plan → tasks →…
SkillCFreshness: CClaude Code +9 - 0.474score
ralph-loop
JimmyBlanquet
Use when implementing features autonomously from a prd.json, spawning fresh Task agents per story with quality gates and atomic commits
SkillCFreshness: CClaude Code +9 - 0.472score
effort-optimizer
JimmyBlanquet
Optimize API costs by adjusting thinking effort per task type.
SkillCFreshness: CClaude Code +9
Cite this page
auth-supabase-complete skill. Agent Mart. https://agentmart.dev/skills/jimmyblanquet-auth-supabase-complete (last updated 2026-10-24)