Thanks to visit codestin.com
Credit goes to officialskills.sh

Back to skills

auth0-fastify-api

communitysecurity

Secures Fastify API endpoints with JWT Bearer token validation through Auth0.

Setup & Installation

npx skills add https://github.com/auth0/agent-skills --skill auth0-fastify-api
or paste the link and ask your coding assistant to install it
https://github.com/auth0/agent-skills/tree/main/plugins/auth0-sdks/skills/auth0-fastify-api
View on GitHub

What This Skill Does

Secures Fastify API endpoints with JWT Bearer token validation through Auth0. It registers as a Fastify plugin and provides route-level middleware for verifying access tokens and checking scopes or permissions on REST APIs.

It handles JWKS fetching, token verification, and scope checks out of the box, so you don't have to manually decode JWTs or manage signing key rotation yourself.

When to use it

  • Adding JWT validation to a Fastify REST API that serves a React frontend
  • Restricting API routes by scope so only certain clients can write data
  • Building a microservice that accepts access tokens from a mobile app
  • Protecting admin-only endpoints with permission checks on a Fastify server
  • Validating Auth0 access tokens on a Fastify v5 backend without writing custom middleware