feat: oversea oauth

This commit is contained in:
xiaose committed 2026-01-28 16:02:08 +08:00
1 parent 730d229067
commit cdd03f465d
4 files changed
+29 -21

No files matched your search

+11 -16
View File
@@ -1,38 +1,33 @@
# MiniMax OAuth (Clawdbot plugin)
# MiniMax OAuth (Moltbot plugin)
OAuth provider plugin for **MiniMax** (free-tier OAuth).
OAuth provider plugin for **MiniMax** (OAuth).
## Enable
Bundled plugins are disabled by default. Enable this one:
```bash
clawdbot plugins enable minimax-portal-auth
moltbot plugins enable minimax-portal-auth
```
Restart the Gateway after enabling.
```bash
moltbot gateway restart
```
## Authenticate
### Global Endpoint (global user)
Uses `api.minimax.io`:
```bash
clawdbot models auth login --provider minimax-portal --set-default
moltbot models auth login --provider minimax-portal --set-default
```
### China Endpoint
You will be prompted to select an endpoint:
Uses `api.minimaxi.com`:
```bash
clawdbot models auth login --provider minimax-portal --auth-id oauth-cn --set-default
```
- **Global** - International users, optimized for overseas access (`api.minimax.io`)
- **China** - Optimized for users in China (`api.minimaxi.com`)
## Notes
- MiniMax OAuth uses a device-code login flow.
- Tokens auto-refresh; re-run login if refresh fails or access is revoked.
- Global endpoint: `api.minimax.io` (default)
- China endpoint: `api.minimax.chat` (use `--auth-id oauth-cn`)
+2 -2
View File
@@ -110,7 +110,7 @@ function createOAuthHandler(region: MiniMaxRegion) {
const minimaxPortalPlugin = {
id: "minimax-portal-auth",
name: "MiniMax OAuth",
description: "OAuth flow for MiniMax (free-tier) models",
description: "OAuth flow for MiniMax models",
configSchema: emptyPluginConfigSchema(),
register(api) {
api.registerProvider({
@@ -129,7 +129,7 @@ const minimaxPortalPlugin = {
{
id: "oauth-cn",
label: "MiniMax OAuth (CN)",
hint: "CN endpoint - api.minimax.chat",
hint: "CN endpoint - api.minimaxi.com",
kind: "user_code",
run: createOAuthHandler("cn"),
},
@@ -0,0 +1,11 @@
{
"name": "@moltbot/minimax-portal-auth",
"version": "2026.1.27",
"type": "module",
"description": "Moltbot MiniMax Portal OAuth provider plugin",
"moltbot": {
"extensions": [
"./index.ts"
]
}
}