AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Fastify Auth And Oauth

skill-andrewsrigom-agent-skills-fastify-auth-and-oauth · by andrewsrigom

Use when implementing authentication or OAuth flows in Fastify, especially authorization code with PKCE, login callbacks, token validation, refresh handling, session or cookie boundaries, and protected route hooks.

No reviews yet
0 installs
33 views
0.0% view→install

Install

$ agentstack add skill-andrewsrigom-agent-skills-fastify-auth-and-oauth

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-andrewsrigom-agent-skills-fastify-auth-and-oauth)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
5mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Fastify Auth And Oauth? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

Fastify Auth And OAuth

Use this skill for Fastify services that need local auth boundaries or OAuth-based login and token validation.

Scope

  • authorization code flow with PKCE
  • login and callback route design
  • session and cookie boundaries for browser-based auth
  • access token and refresh token handling
  • JWT claim validation and protected routes
  • redirect URI, state, scope, and issuer or audience validation
  • Fastify hooks and plugins that enforce auth consistently

Default path

  1. Confirm whether the app is a browser-facing OAuth client, an API validating tokens, or both.
  2. Prefer authorization code with PKCE for user login flows.
  3. Keep the callback route focused on exchanging the code, validating state, and creating the local session boundary.
  4. Store only the minimum token material needed for the app flow.
  5. Validate token claims at the API boundary:
  • expiration
  • issuer
  • audience
  • subject when relevant
  1. Rotate refresh tokens consistently if the provider uses rotation semantics.
  2. Protect routes with a shared hook or middleware boundary instead of duplicating token checks per handler.

When to deviate

  • Use API-only token validation flows when the service is not doing browser login.
  • Prefer local session boundaries when the app is browser-facing and token secrecy matters.
  • Move to general Fastify best practices when the real problem is plugin or lifecycle architecture rather than auth flow design.

Guardrails

  • Do not use implicit flow for new browser-based work.
  • Do not skip PKCE for public clients.
  • Do not accept arbitrary redirect URIs.
  • Do not log raw access tokens or refresh tokens.
  • Do not treat signature verification as enough if issuer or audience checks are missing.
  • Prefer secure, HttpOnly cookie-backed session boundaries over browser storage for sensitive token material.

Avoid

  • using implicit flow for new browser-based work
  • skipping PKCE on public clients
  • accepting open redirect-uri behavior
  • validating JWT signatures without issuer or audience checks
  • scattering auth checks across handlers

Verification checklist

  • the app type is clear: browser client, API validator, or both
  • authorization code with PKCE is used where appropriate
  • callback routes only do the callback job
  • token claims are validated beyond signature
  • route protection is centralized in a shared Fastify boundary

Common Routing Cues

  • OAuth, PKCE, access token, refresh token, redirect URI, state, authorization code, bearer token, JWT validation, login callback, Fastify auth hook, @fastify/oauth2

Output Shape

When answering with this skill, prefer:

  • the right flow for the app type
  • where session creation belongs
  • which claims and callbacks must be validated
  • which route or hook should enforce auth
  • which secrets must stay server-only

Official References

  • https://datatracker.ietf.org/doc/html/rfc6749
  • https://datatracker.ietf.org/doc/html/rfc6750
  • https://datatracker.ietf.org/doc/html/rfc7636
  • https://datatracker.ietf.org/doc/html/rfc7519
  • https://datatracker.ietf.org/doc/html/rfc8252
  • https://github.com/fastify/fastify-oauth2

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.