Skip to content

fix(cli): avoid second OIDC roundtrip after auth login completion#561

Open
facundo-herodevs wants to merge 1 commit intomainfrom
93-cli-auth-double-continue
Open

fix(cli): avoid second OIDC roundtrip after auth login completion#561
facundo-herodevs wants to merge 1 commit intomainfrom
93-cli-auth-double-continue

Conversation

@facundo-herodevs
Copy link
Copy Markdown
Member

@facundo-herodevs facundo-herodevs commented Apr 22, 2026

Closes https://github.com/neverendingsupport/idp/issues/93

What This Branch Does

This branch removes the extra browser auth roundtrip that happened after hd auth login had already completed successfully on the local callback. Instead of sending the browser to the web OAuth callback route, the CLI now finishes on the static cli-logged-in page so the user sees a single completion flow.

CLI Login Completion

  • Updated config.eolLogInUrl to use https://apps.herodevs.com/eol/cli-logged-in instead of https://apps.herodevs.com/eol/api/auth/cli-log-in.
  • This keeps the existing local PKCE callback behavior intact while preventing the browser from triggering a second OIDC authorization request through the web callback route in src/config/constants.ts.

Test Coverage

  • Extended the successful callback test in test/commands/auth/login.test.ts to assert that the browser response now returns a 302 to the static completion page, including the exact Location header and response completion checks in the updated success-path assertion.
  • Verified locally with npx vitest run test/commands/auth/login.test.ts.

@facundo-herodevs facundo-herodevs requested a review from a team as a code owner April 22, 2026 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants