Token导航 LogoToken导航TokenDH.com
开发敏感数据clawhub未标认证来源可访问clear审计通过

oauthOAuth 安全

Agent Skill

用于辅助安全审计、权限检查、凭据风险、认证流程和常见漏洞排查。它适合让 Agent 梳理敏感配置、检查依赖风险、分析鉴权逻辑或生成安全复核清单。使用时不能把工具输出直接当最终结论,涉及密钥、令牌、用户数据或生产系统时,应先确认最小权限、脱敏方式和操作边界。

总安装

37,945

周安装

1,597

GitHub Stars

2

下载量

13,287
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:oauth(OAuth 安全)
来源仓库:https://github.com/ivangdavila/oauth
安装命令:
openclaw skills install oauth
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install oauth

简介

用于辅助安全审计、权限检查和认证流程排查。

  • 适合让 Agent 梳理敏感配置、
  • 分析鉴权逻辑或生成安全复核清单。适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。
  • 不能将工具输出直接作为最终结论, 涉及密钥时应先确认最小权限。oauth 属于开发类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
OAuth
description
Implement OAuth 2.0 and OpenID Connect flows securely.
metadata
{"clawdbot":{"emoji":"🔑","os":["linux","darwin","win32"]}}

Flow Selection

  • Authorization Code + PKCE: use for all clients—web apps, mobile, SPAs
  • Client Credentials: service-to-service only—no user context
  • Implicit flow: deprecated—don't use; was for SPAs before PKCE existed
  • Device Code: for devices without browsers (TVs, CLIs)—user authorizes on separate device

PKCE (Proof Key for Code Exchange)

  • Required for public clients (SPAs, mobile), recommended for all
  • Generate code_verifier: 43-128 char random string, stored client-side
  • Send code_challenge: SHA256 hash of verifier, sent with auth request
  • Token exchange includes code_verifier—server verifies against stored challenge
  • Prevents authorization code interception—attacker can't use stolen code without verifier

State Parameter

  • Always include state in authorization request—prevents CSRF attacks
  • Generate random, unguessable value; store in session before redirect
  • Verify returned state matches stored value before processing callback
  • Can also encode return URL or other context (encrypted or signed)

Redirect URI Security

  • Register exact redirect URIs—no wildcards, no open redirects
  • Validate redirect_uri on both authorize and token endpoints
  • Use HTTPS always—except localhost for development
  • Path matching is exact—/callback/callback/

Tokens

  • Access token: short-lived (minutes to hour), used for API access
  • Refresh token: longer-lived, used only at token endpoint for new access tokens
  • ID token (OIDC): JWT with user identity claims—don't use for API authorization
  • Don't send refresh tokens to resource servers—only to authorization server

Scopes

  • Request minimum scopes needed—users trust granular requests more
  • Scope format varies: openid profile email (OIDC), repo:read (GitHub-style)
  • Server may grant fewer scopes than requested—check token response
  • openid scope required for OIDC—triggers ID token issuance

OpenID Connect

  • OIDC = OAuth 2.0 + identity layer—adds ID token and UserInfo endpoint
  • ID token is JWT with sub, iss, aud, exp + profile claims
  • Verify ID token signature before trusting claims
  • nonce parameter prevents replay attacks—include in auth request, verify in ID token

Security Checklist

  • HTTPS everywhere—tokens in URLs must be protected in transit
  • Validate iss and aud in tokens—prevents token confusion across services
  • Bind authorization code to client—code usable only by requesting client
  • Short authorization code lifetime (10 min max)—single use
  • Implement token revocation for logout/security events

Common Mistakes

  • Using access token as identity proof—use ID token for authentication
  • Storing tokens in localStorage—vulnerable to XSS; prefer httpOnly cookies or memory
  • Not validating redirect_uri—allows open redirect attacks
  • Accepting tokens from URL fragment in backend—fragment never reaches server
  • Long-lived access tokens—use short access + refresh pattern

Token Endpoints

  • /authorize: user-facing, returns code via redirect
  • /token: backend-to-backend, exchanges code for tokens; requires client auth for confidential clients
  • /userinfo (OIDC): returns user profile claims; requires access token
  • /revoke: invalidates tokens; accepts access or refresh token

Client Types

  • Confidential: can store secrets (backend apps)—uses client_secret
  • Public: cannot store secrets (SPAs, mobile)—uses PKCE only
  • Never embed client_secret in mobile apps or SPAs—it will be extracted

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

96.48%
按下载量换算12,819

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills