mcpField
A
authentication

authentication

github.com/andrelandgrafSecurity23132 installsUpdated 21w ago
Repository

About authentication

An authentication recipe for Next.js developers, guiding setup of Better Auth flows for email verification, password resets, protected routes, and account management.

Key features

  1. 01Email and password authentication
  2. 02Email verification and password resets
  3. 03Authentication pages and components
  4. 04Profile and session management
  5. 05Server-side route protection

Use cases

  1. 01Add sign-up and sign-in flows to an app
  2. 02Send verification and password-reset emails
  3. 03Manage profile, password, and sessions
  4. 04Restrict selected pages to authenticated users

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/andrelandgraf/fullstackrecipes --skill authentication

After installing, type/authenticationin Claude Code to confirm it loaded.

Details

From the project README

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

curl -H "Accept: text/markdown" https://fullstackrecipes.com/api/recipes/better-auth-protected-routes
Authentication Best Practices

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

bunx skills add andrelandgraf/fullstackrecipes/skills -s authentication-best-practices

Comments

Markdown supported