用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/G1Joshi/Agent-Skills --skill oauth命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
基于 SOC 职业分类
| name | oauth |
| description | OAuth 2.0 authorization framework. Use for authorization. |
OAuth 2.1 is the consolidation of OAuth 2.0 and its best practices into a single standard. It allows third-party applications to grant limited access to an HTTP service through an authorization server.
// Client (Frontend) - redirect to Auth Server
const authUrl = `https://auth.example.com/authorize?
response_type=code&
client_id=${CLIENT_ID}&
redirect_uri=${REDIRECT_URI}&
scope=read:profile&
code_challenge=${pkceChallenge}&
code_challenge_method=S256`;
window.location.href = authUrl;
// Callback (Handling the redirect)
const code = new URLSearchParams(window.location.search).get("code");
const tokenResponse = await fetch("https://auth.example.com/token", {
: ,
: .({
: ,
code,
: ,
: ,
: pkceVerifier,
}),
});
Now Mandatory in OAuth 2.1 for all clients (public and confidential). Prevents authorization code interception attacks.
Do:
Don't:
localStorage (XSS risk). Use HttpOnly cookies or memory.| Error | Cause | Solution |
|---|---|---|
invalid_grant | Code expired or reused. | Get a new authorization code. |
redirect_uri_mismatch | URI doesn't match allowlist. | Check dashboard settings exactly. |