Secure your Fastify app with robust OAuth flows.
API security
Implements and debugs secure OAuth authorization flows, token handling, and route protection in Fastify applications.
When to use it
Use it to implement or debug OAuth flows, validate tokens, protect routes, and resolve security or compliance problems.
Give it OAuth implementation or debugging work in a Fastify project; it returns the corresponding project changes.
What you provide
This skill
npm install @fastify/oauth2 @fastify/cookie @fastify/session fastify-plugin
Installs unpinned Fastify dependencies
An authorization server must provide the configured authorization and token endpoints.
The JWT validation middleware imports @fastify/jwt.
The OAuth client identifier is read from the CLIENT_ID environment variable.
The OAuth client secret is read from the CLIENT_SECRET environment variable.