auth-security
仓库创建 2025年12月9日最近提交 10 天前SkillHot 收录 21 天前
▸ 精选理由
对实现安全认证与令牌管理的后端工程师非常实用,细节到位。
这个 Skill 做什么
提供符合 RFC 的 OAuth2.1 与 JWT 身份认证与授权安全最佳实践。
帮你把 OAuth 2.1 / JWT 的身份认证和授权做对了,给出从 PKCE、短期 access token、单次 refresh 到 HttpOnly cookie 的落地做法。适合实现登录、API 授权或 token 管理时使用,尤其需要遵循 RFC9700 的场景。强调细节防护(如显式校验 JWT 算法、不做向后兼容退路),降低被滥用和配置出错的风险。
▸ 展开 SKILL.md 英文原文
OAuth 2.1 + JWT authentication security best practices. Use when implementing auth, API authorization, token management. Follows RFC 9700 (2025).
240
Stars
23
Forks
40
仓库内 Skill
+8
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/majiayu000/spellbook/main/skills/auth-security/SKILL.md或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/majiayu000/spellbook/main/skills/auth-security/SKILL.md"SKILL.MD 节选查看完整文件 ↗
# Auth Security ## Core Principles - **OAuth 2.1** — Follow RFC 9700 (January 2025) - **PKCE Required** — All clients must use PKCE - **Short-lived Tokens** — Access tokens expire in 5-15 minutes - **Token Rotation** — Refresh tokens are single-use - **HttpOnly Storage** — Browser tokens in HttpOnly cookies - **Explicit Algorithm** — Never trust JWT header algorithm - **No backwards compatibility** — Delete deprecated auth flows --- ## OAuth 2.1 Key Changes ### Deprecated Flows (DO NOT USE) | Flow | Status | Replacement | |------|--------|-------------| | Implicit Grant | Removed | Authorization Code + PKCE | | Password Grant | Removed | Authorization Code + PKCE | | Auth Code without
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有