oauth

Implement OAuth 2.0/2.1 authorization flows with PKCE in Fastify applications.

Updated Feb 16, 2026
One-click install
npx skills add https://github.com/Akallabet/akallabeth-cc-marketplace --skill oauth-akallabet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: oauth
Source: https://github.com/Akallabet/akallabeth-cc-marketplace/tree/main/plugins/ak-coding/skills/oauth
Command: npx skills add https://github.com/Akallabet/akallabeth-cc-marketplace --skill oauth-akallabet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @fastify/oauth2, @fastify/cookie, @fastify/session, fastify-plugin, @fastify/jwt, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill simplifies the complex process of implementing robust OAuth 2.0 and 2.1 authorization flows within Fastify applications, ensuring secure and compliant authentication.

Core Features & Use Cases

  • Authorization Code Flow with PKCE: Securely handles user logins for public clients.
  • Token Management: Manages access and refresh tokens, including rotation for enhanced security.
  • JWT Validation: Validates JWTs against standard claims and custom requirements.
  • Route Protection: Provides middleware to secure API endpoints based on token validity.
  • Use Case: You are building a new API using Fastify and need to implement a standard login flow where users can authenticate via an external OAuth provider like Google or Auth0, ensuring their sessions are secure and their access is properly authorized.

Quick Start

Use the oauth skill to implement the Authorization Code + PKCE flow in your Fastify application by installing dependencies and registering the plugin.

Frequently Asked Questions about oauth

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement OAuth 2.0 authorization code flow with PKCE in a Fastify application?

To implement OAuth 2.0 authorization code flow with PKCE in Fastify, you can use this Skill to register the necessary plugins and configure secure public client logins via external providers. It handles token management and route protection automatically.

What is the best way to secure Fastify routes using JWT validation and token introspection?

Securing Fastify routes with JWT validation involves checking standard claims and custom requirements on access tokens. This Skill provides middleware to validate JWTs, manage token introspection, and protect API endpoints based on token validity.

Does this OAuth implementation support client credentials and device flow for server-side Fastify APIs?

Yes, this OAuth implementation supports client credentials and device flow alongside authorization code with PKCE. It manages access and refresh tokens, including token rotation for enhanced security within your Fastify server-side applications.

Why does my Fastify OAuth setup fail with redirect URI mismatches and CSRF issues?

OAuth setup fails with redirect URI mismatches and CSRF issues due to incorrect callback configurations or missing state parameter validation. This Skill troubleshoots token validation errors, redirect URI mismatches, CSRF issues, and ensures strict RFC compliance.

Can I use @fastify/jwt and @fastify/cookie together to manage OAuth sessions in Fastify?

Yes, you can use @fastify/jwt and @fastify/cookie together to manage OAuth sessions. This Skill integrates these dependencies along with @fastify/session and @fastify/oauth2 to handle secure authentication flows and token storage.