跳转到主要内容

Oauth

技能 活跃

为 Fastify 应用程序实现 OAuth 2.0/2.1 授权流程——配置 PKCE 授权码、客户端凭证、设备流、刷新令牌轮换、JWT 验证以及令牌内省/撤销端点。在设置身份验证、授权、登录流程、访问令牌、API 安全,或使用 OAuth 保护 Fastify 路由时使用;也适用于对令牌验证错误、重定向 URI 不匹配、CSRF 问题、范围问题或 RFC 6749/6750/7636/8252/8628 合规性问题的故障排除。

目的

使开发人员能够在 Fastify 应用程序中安全地实现和管理 OAuth 2.0/2.1 授权流程,涵盖各种授权类型和安全最佳实践。

功能

  • 配置 PKCE 授权码
  • 支持客户端凭证和设备流
  • 实现刷新令牌轮换
  • 处理 JWT 验证和令牌内省
  • 使用 OAuth 中间件保护 Fastify 路由

使用场景

  • 在 Fastify 中设置身份验证和登录流程
  • 使用 OAuth 访问令牌保护 API 路由
  • 对令牌验证错误和 RFC 合规性进行故障排除
  • 使用 OAuth 2.1 实现安全 API 安全模式

非目标

  • 实现一个功能齐全的 OAuth 2.0 授权服务器
  • 为非 Node.js 环境提供客户端 OAuth 库
  • 处理 Fastify 功能之外的低级网络传输细节

维护

  • warning:依赖项管理虽然在安装示例中列出了依赖项,但没有明确提到锁定文件或像 Dependabot 这样的自动化依赖项更新机制,也没有进行漏洞扫描。

版本控制

  • warning:发布管理存储库未在 SKILL.md 前置元数据中明确声明版本,也未使用 GitHub 发布标签。安装说明指向 `HEAD`,使得版本固定变得困难。

执行

  • warning:固定依赖项安装说明列出了依赖项,但未包含锁定文件(例如 `package-lock.json`)以确保可重现的构建和固定的版本。

安装

npx skills add mcollina/skills

通过 npx 运行 Vercel skills CLI(skills.sh)— 需要本地安装 Node.js,以及至少一个兼容 skills 的智能体(Claude Code、Cursor、Codex 等)。前提是仓库遵循 agentskills.io 格式。

质量评分

96 /100
2 days ago 分析

信任信号

最近提交28 days ago
星标1.8k
许可证MIT
状态
查看源代码

类似扩展

Auth0 Express OAuth2 JWT Bearer

100

Use when adding Auth0 token validation to Express or Node.js APIs - integrates express-oauth2-jwt-bearer SDK to protect Node.js API endpoints with JWT Bearer authentication, scope-based RBAC, claim validation, and optional DPoP support

技能
auth0

Auth Implementation Patterns

98

Master authentication and authorization patterns including JWT, OAuth2, session management, and RBAC to build secure, scalable access control systems. Use when implementing auth systems, securing APIs, or debugging security issues.

技能
wshobson

Auth0 Nuxt

100

Use when implementing Auth0 authentication in Nuxt 3/4 applications, configuring session management, protecting routes with middleware, or integrating API access tokens - provides setup patterns, composable usage, and security best practices for the @auth0/auth0-nuxt SDK

技能
auth0

Auth0 Java Mvc Common

100

Use when adding Auth0 login, logout, and callback handling to Java Servlet web applications - integrates com.auth0:mvc-auth-commons SDK for server-side Java apps using javax.servlet with session-based authentication. Triggers on AuthenticationController, AuthorizeUrl, Tokens, IdentityVerificationException, Java MVC auth.

技能
auth0

Better Auth Authentication

99

Better Auth authentication flows for TypeScript apps. Use when enabling email/password auth, configuring social providers, or implementing sign-up, sign-in, and verification flows.

技能
bobmatnyc

Better Auth

99

Add authentication with Better Auth (TypeScript). Use for email/password, OAuth providers (Google, GitHub), 2FA/MFA, passkeys/WebAuthn, sessions, RBAC, rate limiting.

技能
binjuhor