Skip to content

Add /gpushed/cli-login to approve gpushed CLI sign-ins - #10

Merged
mehfuzh merged 1 commit into
mainfrom
gpushed-cli-login
Nov 14, 2026
Merged

mehfuzh merged 1 commit into
mainfrom
gpushed-cli-login

Conversation

@mehfuzh

@mehfuzh mehfuzh commented Nov 14, 2026

Copy link
Copy Markdown
Member

This commit was meant to be part of #9, but #9 was merged before it was pushed.

gpushed login (gpushed v0.2.2) signs in in the browser: it opens /gpushed/cli-login?code=XXXX-XXXX. Without this page, that's a 404. The page:

  • sends you through /login?redirect=… first if you're signed out, then brings you back with the same code;
  • shows the code, asking you to approve only if your terminal shows the same one;
  • on Approve, calls POST /auth/cli/approve on the gpushed API (already deployed, Sign in to the CLI in the browser gpushed#14) with your session, then tells you to go back to the terminal;
  • shows the API's error if the code has expired (10 minutes) or was already used.

It isn't behind the superuser-only redirect that /gpushed has, so any smartloop user can sign the CLI in.

Checks: tsc --noEmit passes, and next build compiles and exports /gpushed/cli-login.

🤖 Generated with Claude Code

gpushed login opens this page with the code shown in the terminal. It
sends you through /login first if you're signed out, shows the code, and
on Approve calls the gpushed API's /auth/cli/approve with your session;
the CLI, polling, then gets its token.
@mehfuzh
mehfuzh merged commit cf4695b into main Nov 14, 2026
1 check passed
@mehfuzh
mehfuzh deleted the gpushed-cli-login branch November 14, 2026 08:43
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.

1 participant