fix(cli): resolve blank device code and undefined verification URL in oauth start (#11164) - #11173
Merged
diegosouzapw merged 1 commit intoAug 22, 2026
Conversation
diegosouzapw
force-pushed
the
fix/oauth-device-code-undefined-11164
branch
from
August 22, 2026 23:13
7c88f7c to
1d10740
Compare
diegosouzapw
merged commit Aug 22, 2026
ec6010f
into
diegosouzapw:release/v3.8.50
5 of 7 checks passed
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
… oauth start (diegosouzapw#11164) (diegosouzapw#11173) Cherry-picked onto the current tip (authorship preserved), noise stripped. Focused: oauth-device-flow-11164 green + 9474-claude-code-oauth-mismap neighbor suite green. Device-code endpoint is tried first, camelCase/snake_case fallbacks normalized, no more blank code / 'Visit: undefined'. Fixes diegosouzapw#11164. Thank you @rqzbeh!
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
Resolves #11164 where
omniroute oauth start --provider claude-code --no-browser(and other device-flow CLI OAuth commands) printed a blank device code andVisit: undefined:Endpoint Resolution:
Updated
runDeviceFlowinbin/cli/commands/oauth.mjsto try/api/oauth/${providerKey}/device-codebefore falling back to/api/providers/${providerKey}/auth/start.Property Normalization:
Extracted property fallbacks for both camelCase and snake_case response payloads:
userCode:start.userCode ?? start.user_code ?? ""verificationUri:start.verificationUriComplete ?? start.verification_uri_complete ?? start.verificationUri ?? start.verification_uri ?? start.authUrl ?? start.url ?? ""Output Formatting:
Surfaces
Device code: ...only when a user code is present; avoids printingundefinedURLs or empty labels.Verification
node --import tsx/esm --test tests/unit/oauth-device-flow-11164.test.ts(PASS)npm run typecheck:core(0 errors)npm run check:docs-all(PASS)