← 返回
安全合规 中文

Authenticate

Sign in to the Finance District agent wallet. Use when you or the user want to log in, sign in, connect, set up, or configure the wallet, or when any wallet...
登录 Finance District 代理钱包。当您或用户想要登录、连接、设置或配置钱包时使用。
rachidjarray-hk-qa-fdt
安全合规 clawhub v0.1.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 578
下载
💾 1
安装
1
版本
#latest

概述

Authenticating with the Finance District Agent Wallet

When the wallet is not signed in (detected via fdx status or when wallet operations fail with authentication errors), use the fdx CLI to authenticate via OAuth 2.1.

Authentication requires a browser — the agent guides the human through the flow, but the human must complete the browser-based authorization step.

Checking Authentication Status

fdx status

Displays the MCP server URL, token state, expiry, and whether a refresh token is available.

Authentication Flow

FDX supports two OAuth flows depending on the environment:

Browser Flow (default)

Use when the human has a browser available on the same machine:

fdx setup

This will:

  1. Register a client with the MCP server
  2. Print an authorization URL
  3. Start a local callback server on port 6260
  4. Wait for the human to complete browser authorization
  5. Exchange the authorization code for tokens

Tell your human: "Please open the URL in your browser and authorize the wallet. I'll wait for the callback."

Device Flow

Use when the human cannot open a browser on the same machine (e.g. remote server, headless environment):

fdx setup --device

This will:

  1. Register a device client with the MCP server
  2. Display a verification URL and a user code
  3. Poll for authorization completion

Tell your human: "Please go to the verification URL on any device, enter the code shown, and authorize. I'll wait here."

Logging Out

fdx logout

Removes stored credentials. The human will need to run fdx setup again to re-authenticate.

Example Session

# Check current status
fdx status

# If not authenticated, start login
fdx setup

# Human completes browser authorization...

# Confirm authentication succeeded
fdx status

Token Lifecycle

  • Tokens auto-refresh on subsequent fdx call commands if a refresh token is available
  • If the token is expired and no refresh token exists, the human must run fdx setup again
  • Token state is stored locally (default: ~/.fdx/auth.json)

Environment Variables

VariableDescriptionDefault
-----------------------------------------------------------------------------
FDX_MCP_SERVERMCP server URLhttps://mcp.fd.xyz
FDX_REDIRECT_URIOAuth callback URIhttp://localhost:6260/oauth/callback
FDX_STORE_PATHToken store file path~/.fdx/auth.json

Error Handling

  • "not authenticated" — Run fdx setup to authenticate
  • "token expired" with refresh token — Will auto-refresh on next call; no action needed
  • "token expired" without refresh token — Run fdx setup again
  • "OAuth state mismatch" — Possible CSRF; restart with fdx setup
  • "Callback server error" — Port 6260 may be in use; try --device flow instead

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-29 22:09 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,210 📥 266,122
security-compliance

MoltGuard - Security & Antivirus & Guardrails

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

Pay For Service

rachidjarray-hk-qa-fdt
{"answer": "使用 x402 支付协议访问付费 API 端点和内容。"}
★ 0 📥 675