File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,10 +144,17 @@ mmx auth logout
144144```
145145
146146` mmx auth status ` is the canonical way to verify active authentication.
147- Both OAuth and API-key credentials live in ` ~/.mmx/config.json ` (the two are
148- mutually exclusive — logging in with one method clears the other). API keys
149- can also be passed per command via ` --api-key ` . With an API key, the region
150- is auto-detected by probing both Global and CN.
147+
148+ ** OAuth** uses the [ Device Authorization Grant (RFC 8628)] ( https://tools.ietf.org/html/rfc8628 ) with PKCE —
149+ the CLI opens your browser, you enter a code, and ` access_token ` + ` refresh_token `
150+ are saved to ` ~/.mmx/config.json ` . Tokens refresh automatically (5-min buffer);
151+ manual refresh via ` mmx auth refresh ` .
152+
153+ ** API key** auth auto-detects the correct region by probing both Global and CN.
154+ Useful for CI/CD (` mmx auth login --api-key sk-xxxxx ` ), or pass per-command via ` --api-key ` .
155+
156+ OAuth and API key are mutually exclusive — logging in with one clears the other.
157+ Credential priority: ` --api-key ` flag > OAuth (config) > ` api_key ` (config).
151158
152159### ` mmx config ` · ` mmx quota `
153160
Original file line number Diff line number Diff line change 11{
22 "name" : " mmx-cli" ,
3- "version" : " 1.0.15 " ,
3+ "version" : " 1.0.16 " ,
44 "description" : " CLI for the MiniMax AI Platform" ,
55 "type" : " module" ,
66 "engines" : {
You can’t perform that action at this time.
0 commit comments