Skip to content

feat: add MiniMax OAuth device code flow + multi-region support#133

Closed
jiemu-minimax wants to merge 11 commits into
MiniMax-AI:mainfrom
jiemu-minimax:feat/oauth
Closed

feat: add MiniMax OAuth device code flow + multi-region support#133
jiemu-minimax wants to merge 11 commits into
MiniMax-AI:mainfrom
jiemu-minimax:feat/oauth

Conversation

@jiemu-minimax
Copy link
Copy Markdown

Summary

  • Add OAuth device code flow login with PKCE (mmx auth login)
  • Multi-region support (global / CN) with interactive region selection on first login
  • Token refresh with retry logic and 5-minute proactive buffer
  • Propagate BEDROCK_LANE and X-User-Pre headers to all API and auth requests

Test plan

  • mmx auth login — interactive region selection on first login
  • OAuth device code flow completes successfully (global)
  • OAuth device code flow completes successfully (CN, --region cn)
  • Token refresh works when token expires
  • BEDROCK_LANE / X_USER_PRE env — verify headers in requests
  • mmx auth login --api-key — API key flow unaffected
  • Region saved to config, not re-asked on subsequent logins

🤖 Generated with Claude Code

jiemu-minimax and others added 11 commits May 12, 2026 10:54
Server returns expired_in as Unix timestamp (ms), matching the old
user_management protocol and OpenClaw client expectations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…d-only

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ropic in endpoint URL

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants