← 返回
未分类 中文

a2a-Market-Google-OAuth

Handle Google OAuth login, account linking, and session bootstrap for A2A market users and operators. Use when implementing identity login endpoints, callbac...
处理 Google OAuth 登录、账户关联以及 A2A 市场用户与运营者的会话初始化。用于实现身份登录端点、回调...
luoqianchenguni-max
未分类 clawhub v0.2.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 531
下载
💾 1
安装
1
版本
#latest

概述

a2a-Market Google OAuth

Create a stable OAuth integration shell for buyer and merchant sign-in.

Current status: publish-ready scaffold. Keep flows explicit and deterministic before full SSO hardening.

Scope

  • Implement Google OAuth authorization code flow.
  • Link external identity to internal Agent/Operator profile.
  • Bootstrap session token and refresh workflow after callback.

Suggested Project Layout

  • app/integrations/oauth/google_client.py
  • app/interfaces/api/auth_routes.py
  • app/application/services/session_service.py
  • app/protocol/identity/user_identity_mapper.py

Minimum Contracts (MVP P0)

  1. GET /auth/google/start builds state + redirect URL.
  2. GET /auth/google/callback validates state and exchanges code.
  3. upsert_identity(provider, provider_user_id, email) returns internal principal id.
  4. create_session(principal_id) returns short-lived access token and refresh token.

Security Baseline

  • Validate state and nonce against server-side cache.
  • Reject callback if issuer/audience do not match configuration.
  • Store only hashed refresh tokens and rotate on use.

Events

  • Emit login event to audit log stream.
  • Emit session-created event for WebSocket presence bootstrap.

Implementation Backlog

  • Add account merge flow for duplicate emails across providers.
  • Add step-up verification for risky sessions.

Runtime Implementation

  • Status: implemented in local runtime package.
  • Primary code paths:
  • runtime/src/integrations/oauth/google-oauth-service.js
  • Validation: covered by runtime/tests and npm test in runtime/.

版本历史

共 1 个版本

  • v0.2.0 当前
    2026-05-01 22:42 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

a2a-Market-Stripe-Payment

luoqianchenguni-max
集成 Stripe 支付意图、捕获流程和 webhook 对账,适用于 A2A 订单的支付授权、捕获及退款流程实现。
★ 0 📥 898
developer-tools

Amazon Refund & Price Tracker Agent

luoqianchenguni-max
{"answer": "追踪亚马逊价格,监控订单,抓取评论,获取订单详情,起草退款信息,并高效管理退款案例。"}
★ 0 📥 645

a2a supermarket

luoqianchenguni-max
RealMarket A2A 商业工作流的统一入口技能,支持卖家发布商品、买家通过 UCP 市场连通发现商品,并提供更多功能。
★ 0 📥 647