nextjs-better-auth-jwt-usage

Community

Standardize Better Auth with JWT in Next.js apps.

Authormub7865
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Centralizes authentication for Next.js 16+ App Router projects using Better Auth and a JWT plugin, reducing ad-hoc auth implementations and enabling consistent security patterns.

Core Features & Use Cases

  • Central server-side auth instance (lib/auth.ts) and a single API route mount (app/api/auth/[...all]/route.ts).
  • Client-side helpers and a reusable JWT helper (lib/auth-jwt.ts) to attach tokens to API calls.
  • Guidance on route protection, session handling, and environment-based secret management.

Quick Start

Create a centralized auth module, mount the auth route, and implement a reusable JWT helper to attach tokens to API calls.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: nextjs-better-auth-jwt-usage
Download link: https://github.com/mub7865/Hackathone-2/archive/main.zip#nextjs-better-auth-jwt-usage

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.