Repository navigation
fix(cli): keep VOID_TOKEN on the platform that issued it in void auth - #609
Merged
Brooooooklyn merged 1 commit intoOct 27, 2026
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Member
Author
|
@codex review |
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-auth-token-picked-platform-void-cloud.voidzero-docs.workers.dev (commit 9922c64)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
When a project had no saved destination, `void auth status` and `void auth login` asked which platform to use and pointed VOID_API_URL at the answer for that run. The token lookup only checks VOID_TOKEN against VOID_API_URL, so after the switch it treated the token as belonging to the platform picked in the prompt. A token issued by platform A was sent to platform B, and a VOID_TOKEN with no VOID_API_URL was sent too. Now the router only keeps VOID_TOKEN when the picked platform matches the VOID_API_URL the user set. Otherwise it hides VOID_TOKEN for that run, so the command uses the saved login for the picked platform, the same rule `void connect` follows. Both variables are restored afterwards. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brooooooklyn
force-pushed
the
fix/auth-token-picked-platform
branch
from
October 27, 2026 07:54
a993518 to
9922c64
Compare
Brooooooklyn
enabled stacked auto-merge (squash)
October 27, 2026 08:34
stacked auto-merge was automatically disabled
October 27, 2026 08:34
Auto-merge was disabled for another pull request in the stack
fengmk2
approved these changes
Oct 27, 2026
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.
Problem
When a project has no saved destination,
void auth status/void auth loginasks which platform to use, then setsVOID_API_URLto the answer for that run. The token lookup only checksVOID_TOKENagainstVOID_API_URL, so after the switch it believed the token belonged to the platform picked in the prompt. A token from platform A was sent to platform B.What changed
packages/void/src/cli/auth-router.ts: saveVOID_API_URLandVOID_TOKENbefore the switch. KeepVOID_TOKENonly when the user's ownVOID_API_URLmatches the picked platform. Restore both afterwards. This is the same rulevoid connectalready uses.Tests
auth-router.test.ts: three cases call the realgetToken, the lookup that builds the Authorization header, inside the routed command:VOID_API_URL: not usedChoices to check
VOID_TOKENto use a saved login.VOID_TOKENwith noVOID_API_URLis no longer sent to the platform picked in the prompt.🤖 Generated with Claude Code