authentication

Complete authentication system with Better Auth, email verification, password reset, protected routes, and account management.

9 stars

Best use case

authentication is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Complete authentication system with Better Auth, email verification, password reset, protected routes, and account management.

Teams using authentication should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/authentication/SKILL.md --create-dirs "https://raw.githubusercontent.com/andrelandgraf/fullstackrecipes/main/skills/authentication/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/authentication/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How authentication Compares

Feature / AgentauthenticationStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Complete authentication system with Better Auth, email verification, password reset, protected routes, and account management.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Authentication

Complete authentication system with Better Auth, email verification, password reset, protected routes, and account management.

## Prerequisites

Complete these recipes first (in order):

### Type-Safe Environment Configuration with better-env

Use better-env config modules for type-safe server/public env access, feature flags, and either-or credential constraints.

```bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/config-schema-setup
```

### Neon + Drizzle Setup

Connect a Next.js app to Neon Postgres using Drizzle ORM with optimized connection pooling for Vercel serverless functions.

```bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/neon-drizzle-setup
```

### Next.js on Vercel

Create a Next.js app running on Bun, configure the development environment, and deploy to Vercel with automatic deployments on push.

```bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/nextjs-on-vercel
```

### Shadcn UI & Theming

Add Shadcn UI components with dark mode support using next-themes. Includes theme provider and CSS variables configuration.

```bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/shadcn-ui-setup
```

## Cookbook - Complete These Recipes in Order

### Resend Setup

Configure Resend for transactional emails like password resets and email verification.

```bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/resend-setup
```

### Better Auth Setup

Add user authentication using Better Auth with Drizzle ORM and Neon Postgres. Base setup with email/password authentication.

```bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-setup
```

### Better Auth Emails

Add email verification, password reset, and account management emails to Better Auth using Resend.

```bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-emails
```

### Better Auth Components

Add UI components and pages for authentication flows including sign in, sign up, forgot password, reset password, and email verification.

```bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-components
```

### Better Auth Profile & Account

Add a complete account settings page with profile editing, password changes, email updates, session management, and account deletion.

```bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-profile
```

### Better Auth Protected Routes

Add server-side route protection to enforce authentication on specific pages while keeping others public.

```bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-protected-routes
```

### Working with Authentication

Use Better Auth for client and server-side authentication. Covers session access, protected routes, sign in/out, and fetching user data.

```bash
curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/using-authentication
```

Related Skills

using-authentication

9
from andrelandgraf/fullstackrecipes

Use Better Auth for client and server-side authentication. Covers session access, protected routes, sign in/out, and fetching user data.

url-state-management

9
from andrelandgraf/fullstackrecipes

Sync React state to URL query parameters for shareable filters, search, and deep-linkable dialogs with nuqs.

testing

9
from andrelandgraf/fullstackrecipes

Complete testing setup with Neon database branching, Playwright browser tests, integration tests, and unit tests. Isolated branches with automatic TTL cleanup.

stripe-subscriptions

9
from andrelandgraf/fullstackrecipes

Complete subscription billing system with Stripe integration, feature flags for plan gating, webhook handling, and billing portal.

ralph-loop

9
from andrelandgraf/fullstackrecipes

Complete setup for automated agent-driven development. Define features as user stories with testable acceptance criteria, then run AI agents in a loop until all stories pass.

observability-monitoring

9
from andrelandgraf/fullstackrecipes

Complete observability stack with structured logging, error tracking, and web analytics.

env-management

9
from andrelandgraf/fullstackrecipes

Complete better-env workflow: typed config schema, Vercel sync, and prebuild validation.

base-app-setup

9
from andrelandgraf/fullstackrecipes

Complete setup guide for a Next.js app with Shadcn UI, Neon Postgres, Drizzle ORM, and AI SDK.

ai-chat

9
from andrelandgraf/fullstackrecipes

Build a complete AI chat application with database persistence, chat list management, and automatic title generation.

ai-agent-workflow

9
from andrelandgraf/fullstackrecipes

Build resumable multi-agent workflows with durable execution, tool loops, and automatic stream recovery on client reconnection.

workflow-setup

9
from andrelandgraf/fullstackrecipes

Install and configure the Workflow Development Kit for resumable, durable AI agent workflows with step-level persistence, stream resumption, and agent orchestration.

web-design-guidelines

9
from andrelandgraf/fullstackrecipes

Review UI code for Web Interface Guidelines compliance. Use when asked to "review my UI", "check accessibility", "audit design", "review UX", or "check my site against best practices".