auth0-fastify

Official

Secure Fastify apps with Auth0 sessions

Authorauth0
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill guides Fastify developers through wiring up Auth0 session-based authentication so they no longer manually build login, logout, and callback routes or session logic.

Core Features & Use Cases

  • Automatic Auth0 plugin setup: instructs how to register @auth0/auth0-fastify, add a view engine, and let Auth0 create /auth/login, /auth/logout, and /auth/callback endpoints.
  • Session-aware route protection: shows how to guard profile pages with preHandler checks, fetch the authenticated user, and obtain access tokens.
  • Environment-driven secrets: emphasizes storing the tenant domain, client ID, client secret, app base URL, and secure session secret in .env for both development and production.
  • Use Case: build a server-rendered Fastify web app that requires login, display personalized profile data, and call protected APIs without reimplementing low-level session handling.

Quick Start

Register @auth0/auth0-fastify in your Fastify server, configure environment variables for Auth0 credentials and session secrets, and protect both public and profile routes with the plugin's session helpers.

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: auth0-fastify
Download link: https://github.com/auth0/docs-v2/archive/main.zip#auth0-fastify

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.