Handles JWT issuance, secure storage, and automatic refresh token rotation logic.

Install

mkdir -p .claude/skills/jwt-auth && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/7168" && unzip -o skill.zip -d .claude/skills/jwt-auth && rm skill.zip

Installs to .claude/skills/jwt-auth

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Implement secure JWT authentication with refresh token rotation, secure storage, and automatic renewal. Use when building authentication for SPAs, mobile apps, or APIs that need stateless auth with refresh capabilities.
219 chars✓ has a “when” trigger
Advanced

Key capabilities

  • Implements JWT refresh token rotation
  • Stores refresh tokens in httpOnly cookies
  • Provides automatic token renewal logic
  • Detects token reuse for security

How it works

It uses short-lived access tokens and long-lived, rotated refresh tokens stored in secure cookies to maintain stateless authentication.

Inputs & outputs

You give it
User credentials or expired access token
You get back
New access and refresh token pair

When to use jwt-auth

  • Implement JWT refresh token rotation
  • Secure API endpoints with bearer tokens
  • Build auto-renewal logic for client apps

About jwt-auth

Guides the implementation of stateless authentication using JSON Web Tokens. It focuses on security best practices like token rotation and automatic renewal.

Implement secure JWT authentication with refresh token rotation, secure storage, and automatic renewal. Use when building authentication for SPAs, mobile apps, or APIs that need stateless auth with refresh capabilities.

When not to use it

  • Applications requiring stateful sessions
  • Simple internal tools

Prerequisites

Redis

Limitations

  • Requires Redis for token tracking
  • Refresh tokens must be rotated on every use

How it compares

It uses token rotation and memory-only storage instead of standard persistent localStorage tokens.

Compared to similar skills

jwt-auth side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
jwt-auth (this skill)16moCautionAdvanced
supabase-developer957moReviewIntermediate
better-auth-best-practices186moNo flagsIntermediate
zod-4127moNo flagsIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

Search skills

Search the agent skills registry