OA0 = Omni AI 0
OA0 是一个探索 AI 的论坛
现在注册
已注册用户请  登录
OA0  ›  技能包  ›  oauth-helper:支持用户确认的自动化 OAuth 登录流程助手

oauth-helper:支持用户确认的自动化 OAuth 登录流程助手

 
  script ·  2026-02-20 14:56:35 · 3 次点击  · 0 条评论  

名称: oauth-helper
描述: |
通过 Telegram 用户确认实现 OAuth 登录流程自动化。
支持 7 个提供商:Google、Apple、Microsoft、GitHub、Discord、微信、QQ。

功能特性:
- 自动检测登录页面上可用的 OAuth 选项
- 当存在多个选项时,通过 Telegram 询问用户选择
- 授权前进行确认
- 自动处理账户选择和同意页面


OAuth 助手

通过 Telegram 确认实现 OAuth 登录自动化。支持 7 个主流提供商。

支持的提供商

提供商 状态 检测域名
Google accounts.google.com
Apple appleid.apple.com
Microsoft login.microsoftonline.com, login.live.com
GitHub github.com/login/oauth
Discord discord.com/oauth2
微信 open.weixin.qq.com
QQ graph.qq.com

前提条件

  1. Clawd 浏览器已登录 OAuth 提供商(一次性设置)
  2. 已配置 Telegram 频道

核心工作流

流程 A:具有多个 OAuth 选项的登录页面

当用户请求登录网站时:

1. 打开网站登录页面
2. 扫描页面查找可用的 OAuth 按钮
3. 发送 Telegram 消息:
   "🔐 [网站] 支持以下登录方式:
    1️⃣ Google
    2️⃣ Apple
    3️⃣ GitHub
    回复数字进行选择"
4. 等待用户回复(60秒超时)
5. 点击选中的 OAuth 按钮
6. 进入流程 B

流程 B:OAuth 授权页面

当位于 OAuth 提供商的页面时:

1. 检测 OAuth 页面类型(通过 URL)
2. 提取目标网站信息
3. 发送 Telegram:"🔐 [网站] 请求 [提供商] 登录。确认?回复 yes"
4. 等待 "yes" 回复(60秒超时)
5. 执行特定于提供商的点击序列
6. 等待重定向回原始网站
7. 发送:"✅ 登录成功!"

检测模式

Google

URL 模式:
- accounts.google.com/o/oauth2
- accounts.google.com/signin/oauth
- accounts.google.com/v3/signin

Apple

URL 模式:
- appleid.apple.com/auth/authorize
- appleid.apple.com/auth/oauth2

Microsoft

URL 模式:
- login.microsoftonline.com/common/oauth2
- login.microsoftonline.com/consumers
- login.live.com/oauth20

GitHub

URL 模式:
- github.com/login/oauth/authorize
- github.com/login
- github.com/sessions/two-factor

Discord

URL 模式:
- discord.com/oauth2/authorize
- discord.com/login
- discord.com/api/oauth2

微信

URL 模式:
- open.weixin.qq.com/connect/qrconnect
- open.weixin.qq.com/connect/oauth2

QQ

URL 模式:
- graph.qq.com/oauth2.0/authorize
- ssl.xui.ptlogin2.qq.com
- ui.ptlogin2.qq.com

按提供商的点击序列

Google

账户选择器:[data-identifier], .JDAKTe
授权按钮:button:has-text("Allow"), button:has-text("Continue")

Apple

邮箱输入框:input[type="email"], #account_name_text_field
密码输入框:input[type="password"], #password_text_field
继续按钮:button#sign-in, button:has-text("Continue")
信任设备:button:has-text("Trust")

Microsoft

账户选择器:.table-row[data-test-id]
邮箱输入框:input[name="loginfmt"]
密码输入框:input[name="passwd"]
下一步按钮:button#idSIButton9
接受按钮:button#idBtn_Accept

GitHub

邮箱输入框:input#login_field
密码输入框:input#password
登录按钮:input[type="submit"]
授权按钮:button[name="authorize"]
两步验证:input#app_totp

Discord

邮箱输入框:input[name="email"]
密码输入框:input[name="password"]
登录按钮:button[type="submit"]
授权按钮:button:has-text("Authorize")

微信

方式:二维码扫描
- 将二维码截图发送给用户
- 等待手机扫描确认
- 检测页面重定向

QQ

方式:二维码或密码登录
二维码:截图发送给用户
密码模式:
  - 切换:a:has-text("密码登录")
  - 用户名:input#u
  - 密码:input#p
  - 登录:input#login_button

OAuth 按钮检测

扫描登录页面查找以下选择器:

提供商 选择器 常见文本
Google [data-provider="google"], .google-btn "Continue with Google"
Apple [data-provider="apple"], .apple-btn "Sign in with Apple"
Microsoft [data-provider="microsoft"] "Sign in with Microsoft"
GitHub [data-provider="github"] "Continue with GitHub"
Discord [data-provider="discord"] "Login with Discord"
微信 .wechat-btn, img[src*="wechat"] "WeChat Login"
QQ .qq-btn, img[src*="qq"] "QQ Login"

一次性设置

在 Clawd 浏览器中登录每个提供商:

# Google
browser action=navigate profile=clawd url=https://accounts.google.com

# Apple
browser action=navigate profile=clawd url=https://appleid.apple.com

# Microsoft
browser action=navigate profile=clawd url=https://login.live.com

# GitHub
browser action=navigate profile=clawd url=https://github.com/login

# Discord
browser action=navigate profile=clawd url=https://discord.com/login

# 微信/QQ - 使用二维码扫描,无需预先登录

错误处理

  • 无 "yes" 回复 → 取消并通知用户
  • 需要两步验证 → 提示用户手动输入验证码
  • 二维码超时 → 重新截图发送新二维码
  • 登录失败 → 截图并发送给用户用于调试

使用示例

用户:帮我登录 Kaggle

助手:
1. 导航到 kaggle.com/account/login
2. 检测 Google/Facebook/Yahoo 选项
3. 发送:"🔐 Kaggle 支持:
   1️⃣ Google
   2️⃣ Facebook
   3️⃣ Yahoo
   回复数字进行选择"
4. 用户回复:1
5. 点击 Google 登录
6. 检测到 Google OAuth 页面
7. 发送:"🔐 Kaggle 请求 Google 登录。确认?回复 yes"
8. 用户回复:yes
9. 选择账户,点击继续
10. 发送:"✅ 已登录 Kaggle!"

版本历史

  • v1.0.0 - 初始版本,支持 7 个 OAuth 提供商
3 次点击  ∙  0 人收藏  
登录后收藏  
目前尚无回复
0 条回复
About   ·   Help   ·    
OA0 - Omni AI 0 一个探索 AI 的社区
沪ICP备2024103595号-2
Developed with Cursor