Skip to content

[Bug] OAuth login uses international platform URL even when region is set to cn #85

@DearPeter

Description

@DearPeter

Bug Description

OAuth login URL uses international platform (platform.minimax.io) even when region is configured as 'cn' and base_url is set to domestic Chinese endpoint (api.minimaxi.com). This causes 404 errors for domestic Chinese users.

Environment

Steps to Reproduce

  1. Set region to cn: mmx config set --key region --value cn
  2. Set base_url to domestic: mmx config set --key base_url --value https://api.minimaxi.com
  3. Run mmx auth login
  4. Observe the OAuth URL in browser

Actual OAuth URL

https://platform.minimax.io/oauth/authorize?client_id=mmx-cli&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A18991%2Fcallback&scope=api&...

Expected OAuth URL

Should use domestic Chinese platform:

https://platform.minimaxi.com/oauth/authorize?...

Result

  • Domestic Chinese users get 404 page because their accounts/subscriptions are on platform.minimaxi.com, not platform.minimax.io
  • The region setting only affects API base_url but not OAuth URL

Current Workaround

Use API key authentication directly:

mmx config set --key api_key --value YOUR_API_KEY

Suggested Fix

OAuth URL should be derived from region setting or use the same platform domain as base_url:

  • For region=cn: use platform.minimaxi.com
  • For region=global: use platform.minimax.io

Or add a separate config option for platform_url/auth_url.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions