fix: accept api_token as an alias for token in sf login#265
Conversation
|
|
Capy auto-review is paused for this organization because the monthly auto-review limit has been reached. Increase the limit or turn it off in billing settings to resume automatic reviews. |
sf login through console.sfcompute.comsf login through new frontend
The CLI session polling endpoint returns the auth JWT under the `token` field today. Accept `api_token` as a fallback so the CLI stays compatible if the field is renamed server-side.
7f48f08 to
dfdc781
Compare
sf login through new frontendapi_token as an alias for token in sf login
api_token as an alias for token in sf loginapi_token as an alias for token in sf login
|
Just spitballing an alternative, but we can make the Console just reply with |
I'd like to ship this as well to get defense in depth |
Summary
tokenorapi_tokenin thegetSessionpolling response so the CLI is forward- and backward-compatible across the cutover.Motivation
Field rename — the polling response uses
api_tokenon console where the old site usedtoken. The newer rust CLI already tolerates both; this PR brings the standalonesfcli in line so it keeps working both before and after the DNS flip tosfcompute.com -> console.sfcompute.com.Testing
bun run check— clean.bunx biome ci .— clean (only pre-existing warnings).bun run test— 9 / 9 pass.sf loginend-to-end against console pending from a human; @Gii2000 already verified the JWT flow on both sites.