Install
openclaw skills install clawauthLet agents request OAuth access from end users via short links, continue working asynchronously, and later claim reusable third-party API tokens from local keychain storage instead of a centralized SaaS token vault.
openclaw skills install clawauthThis skill gives agents a production-safe OAuth handover flow that is async by default and works across chat/session interruptions.
Use this when the agent needs provider credentials from a human user, but must avoid blocking execution and must avoid long-lived token storage on a third-party auth SaaS.
Most "OAuth gateway" patterns keep user refresh tokens in a central hosted database. clawauth avoids that model:
Result: async UX for agents, minimal operator overhead, and no permanent central token vault by design.
clawauth must already be preinstalled in the trusted runtime image/environment by the operator.
This skill does not instruct dynamic package installation.
OpenClaw can detect this requirement from frontmatter metadata:
metadata.openclaw.requires.bins: ["clawauth"] gates eligibility.metadata.openclaw.install can expose an operator-approved install action in OpenClaw UI/Gateway flows.metadata.openclaw.install for package clawauth.clawauth is missing.If OpenClaw/Gateway does not run the install action automatically, install the CLI manually:
npm i -g clawauth
Then verify:
clawauth --help
openclaw skills check --json
clawauth in the base image/runner and disable ad-hoc package fetches.The published CLI is already wired to:
https://auth.clawauth.appAgents do not need CLAWAUTH_WORKER_URL for normal hosted usage.
Implemented providers in current worker:
Always treat server output as source of truth:
clawauth providers --json
clawauth login start <provider> --json
Extract and forward shortAuthUrl to the user.
Continue other work. Do not block.
Later poll/check:
clawauth login status <sessionId> --json
completed, claim once:clawauth login claim <sessionId> --json
login claim may return sensitive token payload data in JSON output.clawauth login start [provider] [--ttl <seconds>] [--scope <scope>] [--json]clawauth login status <sessionId> [--json]clawauth login claim <sessionId> [--json]clawauth login wait <sessionId> [--timeout <ms>] [--interval <ms>] [--json]clawauth sessions [--json]clawauth session-rm <sessionId> [--json]clawauth token list [--json]clawauth providers [--json]clawauth explainclawauth docslogin start --jsonprovidersessionIdexpiresInshortAuthUrlauthUrlstatusCommandclaimCommandlogin status --jsonstatus (pending | completed | error)providererrorlogin claim --jsonstatus (pending | completed | error)providertokenDatastoredInKeychainkeychainServicekeychainAccount--json for machine parsing.login wait when explicitly needed.pending: schedule retry later.completed: run login claim once.error: surface concise reason and restart with new login start.clawauth sessions --json.clawauth providers --json and choose supported value.state binding provider and expiry.nacl.box) from callback to CLI claimant.Provider not implemented:
login start returns error indicating feature request recorded.Provider misconfigured on backend:
Session expired:
status/claim returns not found/expired; start new session.Lost chat context:
clawauth sessions --json, then continue with status/claim.No token found later:
clawauth token list --json and select provider/account explicitly.# 1) Start
clawauth login start notion --json
# 2) Share shortAuthUrl with user (from JSON output)
# 3) Later check
clawauth login status <sessionId> --json
# 4) Claim when completed
clawauth login claim <sessionId> --json
# 5) Continue with operator-defined downstream API handling
See references/commands.md for compact copy-paste command blocks.