clawbutler-oauth
龙虾管家手机号验证码鉴权插件 (OpenClaw channel plugin)。
功能
POST /plugins/clawbutler-oauth/send-code— 发送短信验证码POST /plugins/clawbutler-oauth/login— 密码或验证码登录,返回 JWTPOST /plugins/clawbutler-oauth/register— 验证码 + 密码注册,返回 JWTGET /plugins/clawbutler-oauth/me— 校验 JWT (Bearer token)GET /plugins/clawbutler-oauth/gateway-token— JWT 换取网关 WebSocket token
配置
{
plugins: {
entries: {
"clawbutler-oauth": {
config: {
smsProvider: "aliyun", // "log" | "aliyun"
smsSignName: "龙虾管家",
smsTemplateCode: "SMS_xxx",
aliyunAccessKeyId: "...",
aliyunAccessKeySecret: "...",
jwtSecret: "自定义密钥(可选)",
},
},
},
},
}
smsProvider: "log" 时验证码打印到控制台(开发模式)。
安装
openclaw plugins install ./clawbutler-oauth
客户端对接
客户端 phoneAuth.ts 中的 authHost() 指向网关地址,请求路径:
POST {authHost}/plugins/clawbutler-oauth/send-code
POST {authHost}/plugins/clawbutler-oauth/login
POST {authHost}/plugins/clawbutler-oauth/register
GET {authHost}/plugins/clawbutler-oauth/me
GET {authHost}/plugins/clawbutler-oauth/gateway-token
