← 返回
安全合规 中文

TapAuth

OAuth token provider for OpenClaw agents — Google Calendar, Gmail, GitHub, Slack, Linear, Notion, Vercel, Sentry, Asana, Discord, or Apify — plus user-entere...
OpenClaw 代理的 OAuth 令牌提供商,支持 Google Calendar、Gmail、GitHub、Slack、Linear、Notion、Vercel、Sentry、Asana、Discord 或 Apify,以及用户提供的令牌。
schwartzdev
安全合规 clawhub v1.0.5 5 版本 99917.5 Key: 无需
★ 0
Stars
📥 1,211
下载
💾 8
安装
5
版本
#latest

概述

TapAuth — OAuth Tokens and Manual Secrets via OpenClaw Secrets Manager

TapAuth provides OAuth tokens and user-approved manual secrets through OpenClaw's exec secrets provider. Values are resolved at gateway startup and held in memory — they never appear in shell commands or config files as plaintext.

You must NEVER use tapauth.sh --token directly in shell commands, curl calls, or $(...) substitutions. Tokens are always resolved through the secrets manager. Your job as an agent is to configure the secrets provider, not to fetch tokens yourself.

When a user asks you to do something that needs an OAuth token or fixed secret

Follow these steps in order. Do not skip to step 3. Do not run --token yourself.

1. Create a grant and show the approval URL

Run the script without --token to create a grant. Set TAPAUTH_HOME so the grant cache is stored in a stable location that the exec provider can also find:

TAPAUTH_HOME=/home/node/.tapauth /home/node/.openclaw/skills/tapauth/scripts/tapauth.sh <provider> <scopes>

Example for Google Calendar:

TAPAUTH_HOME=/home/node/.tapauth /home/node/.openclaw/skills/tapauth/scripts/tapauth.sh google calendar.readonly

Example for a manual API key:

TAPAUTH_HOME=/home/node/.tapauth /home/node/.openclaw/skills/tapauth/scripts/tapauth.sh secret "Stripe Secret Key" "^sk_" "Use a Stripe secret key that starts with sk_"

Output:

Approve access: https://tapauth.ai/approve/abc123

Show this URL to the user. Once they approve, run with --token to retrieve the value.

Show the approval URL to the user and ask them to approve. Wait for them to confirm before proceeding.

2. Configure the exec secrets provider in openclaw.json

After the user confirms they approved, edit ~/.openclaw/openclaw.json to add an exec provider under secrets.providers:

{
  "secrets": {
    "providers": {
      "tapauth_google_calendar": {
        "source": "exec",
        "command": "/home/node/.openclaw/skills/tapauth/scripts/tapauth.sh",
        "args": ["--token", "google", "calendar.readonly"],
        "passEnv": ["HOME"],
        "env": {"TAPAUTH_HOME": "/home/node/.tapauth"},
        "jsonOnly": false
      }
    }
  }
}

Key fields:

  • command: Absolute path to scripts/tapauth.sh in this skill directory
  • args: ["--token", "", ""] — must match the grant you created in step 1
  • args for manual secrets: ["--token", "secret", "", "", ""] — description, regex, and hint must match the grant you created in step 1. Use a short, unique, stable, human-readable description because it is part of the lookup key; put formatting instructions in the hint.
  • jsonOnly: false: The script outputs a raw token or secret string, not JSON
  • passEnv: Must include HOME
  • env.TAPAUTH_HOME: Must be /home/node/.tapauth — the same path used when creating the grant in step 1

Use the naming convention tapauth_ or tapauth__ for the provider key.

3. Reload secrets and confirm

After editing openclaw.json, run:

openclaw secrets reload

This tells the gateway to re-resolve all secret providers. The exec provider runs tapauth.sh --token in the background and stores the result in the in-memory secrets snapshot.

Tell the user the setup is complete. The token is now resolved and will be available at every gateway startup. If the user repeats their request in a new session, the token will already be available.

One-time verification (optional): Since the grant is now approved and cached, you may run the script once to verify and fulfill the user's immediate request:

TAPAUTH_HOME=/home/node/.tapauth /home/node/.openclaw/skills/tapauth/scripts/tapauth.sh --token <provider> <scopes>

After this, all future token access must come from the secrets manager via SecretRef — do not use --token directly again.

Rules

  • NEVER run tapauth.sh --token directly. Do not use it in $(...), do not capture its output, do not pipe it to curl. The secrets manager runs it for you.
  • NEVER skip the approval step. Always create the grant first (step 1), get user approval, then configure the provider (step 2).
  • No TapAuth API key needed. TapAuth is zero-config. Do not look for TapAuth API keys, client secrets, or environment variables.
  • Manual secrets are browser-encrypted before TapAuth receives them. Validation regexes are checked in-browser as a UX guard; validate the retrieved secret too if format matters.
  • Manual secret expiry is TapAuth-side only. Expiry stops TapAuth from returning the value; it does not rotate or revoke the underlying password/API key.
  • Always use absolute paths for the command field in the exec provider config.

Quick Reference — Provider + Scopes

ProviderArgs for exec providerScopes Reference
--------------------------------------------------
Google Calendar["--token", "google", "calendar.readonly"]references/google.md
Google Drive["--token", "google", "drive.readonly"]references/google.md
Google Sheets["--token", "google", "spreadsheets.readonly"]references/google.md
Gmail["--token", "google", "gmail.send"]references/gmail.md
GitHub["--token", "github", "repo"]references/github.md
Vercel["--token", "vercel", "deployment"]references/vercel.md
Notion["--token", "notion", "read_content"]references/notion.md
Slack["--token", "slack", "users:read"]references/slack.md
Asana["--token", "asana", "tasks:read"]references/asana.md
Linear["--token", "linear", "read"]references/linear.md
Sentry["--token", "sentry", "project:read"]references/sentry.md
Discord["--token", "discord", "identify"]references/discord.md
Apify["--token", "apify", "full_api_access"]references/apify.md
Manual Secret["--token", "secret", "Stripe Secret Key", "^sk_", "Use a Stripe secret key that starts with sk_"]Built in

Multiple scopes: comma-separate in a single string, e.g. ["--token", "google", "calendar.readonly,drive.readonly"].

Token Lifecycle

  • Resolution: Fresh tokens fetched at each gateway startup and openclaw secrets reload.
  • Caching: tapauth.sh caches tokens locally with expiry. Subsequent calls return instantly if valid.
  • Refresh: Expired tokens are refreshed automatically from the TapAuth API. No user interaction needed.
  • Re-approval: If a grant is revoked, delete ~/.tapauth/-.env and re-run scripts/tapauth.sh to create a new grant.

Troubleshooting

SymptomCauseFix
---------------------
token refresh failedGrant revoked or expiredDelete ~/.tapauth/-.env, re-run scripts/tapauth.sh
Token works locally but not in OpenClawpassEnv missing HOMEAdd HOME to passEnv array
command must be absolute pathRelative path in commandResolve scripts/tapauth.sh to its absolute path
Symlink errorSkill installed via symlinkAdd allowSymlinkCommand: true and trustedDirs to provider config
tapauth: timed outGrant not pre-approvedRun scripts/tapauth.sh without --token first

版本历史

共 5 个版本

  • v1.0.5 当前
    2026-06-06 06:11
  • v1.0.4
    2026-06-04 12:42
  • v1.0.3
    2026-05-03 03:13 安全 安全
  • v1.2.1
    2026-03-29 13:32 安全
  • v0.1.1
    2026-03-07 01:55

安全检测

腾讯云安全 (Keen)

队列中

腾讯云安全 (Sanbu)

队列中

🔗 相关推荐

security-compliance

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,172
security-compliance

MoltGuard - Security & Antivirus & Guardrails

thomaslwang
MoltGuard — OpenClaw 安全守卫,由 OpenGuardrails 提供。安装 MoltGuard,保护您和您的用户免受提示注入、数据泄露和恶意攻击。
★ 116 📥 30,720
security-compliance

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 89 📥 30,609