feat: manual OAuth code paste#496
Merged
gewenyu99 merged 10 commits intoJun 3, 2026
Merged
Conversation
Two changes to the wizard: 1. Disable `--ci` mode in published builds. PostHog's LLM gateway doesn't grant the required scopes to personal API keys for most users yet, so non-interactive CI runs fail at the gateway. `--ci` now exits with a clear error in the published package (gated on `IS_PRODUCTION_BUILD`, which tsdown inlines as true only in `dist/`), and stays available for dev/test runs. README updated to note CI mode is unsupported. 2. Add a manual OAuth code-entry fallback. On the auth screen, pressing `p` while waiting for OAuth opens a modal where the user can paste either the full callback URL the browser landed on (`http://localhost:8239/callback?code=...`) or just the code. This lets headless/remote shells finish auth when the browser can't reach the local callback server. The OAuth flow races the local callback server against the manually-entered code. Generated-By: PostHog Code Task-Id: a42d87b2-d4a1-4f4a-9180-ea1d2ed40657
🧙 Wizard CIRun the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands: Test all apps:
Test all apps in a directory:
Test an individual app:
Show more apps
Results will be posted here when complete. |
edwinyjlim
approved these changes
Jun 2, 2026
Member
|
/wizard-ci basic-integration/next-js |
🧙 Wizard CI ResultsTrigger ID:
Configuration
|
Collaborator
Author
|
/wizard-ci basic-integration/next-js |
Collaborator
Author
Screen.Recording.2026-06-02.at.10.00.37.PM.movI really stripped it down. It is really ugly still but I think more clear (?) It is a back up thing that (hopefully) most people will not need to see. |
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
OAuth can't complete on headless/remote machines. The wizard opens a browser that redirects back to a local callback server (
http://localhost:8239/callback?code=...). On a remote/SSH/headless box the browser can't reach that local server, so auth never completes and there's no way to finish by hand.Changes
popens a modal (ManualAuthCodeScreen) with a text input.extractOAuthCode()(inoauth.ts) handles both, plus bare query strings, with URL-decoding.performOAuthFlowraces the local callback server against the manually-entered code (getUI().waitForManualAuthCode()), exchanging whichever arrives first using the in-scoperedirect_uriso the token exchange stays valid.WizardUIinterface:InkUIdelegates to new store methods (showManualAuthCode/submitManualAuthCode/dismissManualAuthCode/waitForManualAuthCode);LoggingUIreturns a never-resolving promise (CI bypasses OAuth entirely).remote.oauth.flow.mp4