fix(auth): use region-specific OAuth endpoints for cn region (#85)#88
Closed
raylanlin wants to merge 1 commit intoMiniMax-AI:mainfrom
Closed
fix(auth): use region-specific OAuth endpoints for cn region (#85)#88raylanlin wants to merge 1 commit intoMiniMax-AI:mainfrom
raylanlin wants to merge 1 commit intoMiniMax-AI:mainfrom
Conversation
…-AI#85) OAuth login always used the international platform URLs (platform.minimax.io) regardless of the user's configured region. This causes 404 errors for cn-region users during OAuth login. Changes: - src/auth/oauth.ts: Replace hardcoded DEFAULT_OAUTH_CONFIG with getOAuthConfig(region) that selects the correct endpoints for global vs cn - src/auth/refresh.ts: Use region-specific token refresh URL - src/auth/types.ts: Store region in CredentialFile for token refresh - src/commands/auth/login.ts: Pass region to OAuth flow and persist region in saved credentials
Contributor
Author
|
Closing — OAuth device code endpoints are currently returning 404 on both regions due to ongoing account merging on MiniMax's side. Will revisit once OAuth infrastructure stabilizes. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #85 — OAuth login always used the international platform URL (
platform.minimax.io) regardless of the user's configured region, causing 404 errors for cn-region users.Changes
DEFAULT_OAUTH_CONFIGwithgetOAuthConfig(region)that selects the correct OAuth endpoints forglobalvscnregionfield toCredentialFileso the correct refresh URL can be used laterconfig.regionto OAuth flows and persists region in saved credentialsHow it works