Skip to content

feat(pm-console): a Sign-in screen that turns Google sign-in on - #12517

Merged
dezren39 merged 1 commit into
mainfrom
claude/pm-sso-guided
Nov 22, 2026
Merged

dezren39 merged 1 commit into
mainfrom
claude/pm-sso-guided

Conversation

@dezren39

@dezren39 dezren39 commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

Why

Google sign-in as the first way in has been waiting on a single step: the OAuth client, which Google lets only a signed-in person create (#12417). Around that step there was still a chore: find the right console page, work out the two addresses to enter, then create two secrets with exact names. This puts all of it in the app and leaves only the part that really is hands-only.

What changes

More → Sign-in

  • Says which methods are on (Google, the emailed code).
  • Lists the steps in Google's console, with the two addresses to enter (origin and redirect, taken from this account's Access team) and copy buttons.
  • Takes the client ID and secret and turns Google sign-in on. The emailed code stays as the fallback. The same screen replaces the client later.

Where the two values go

  • Browser → console → expose.py --google-stdin on standard input → Cloudflare. Not the command line, a file, a log, the record of actions (audit: () => ({})), or the edge's storage (the action is not one that is held).
  • The console refuses what is not a Google client before running anything; so does the script before asking Cloudflare anything. If the script fails, its reason is passed on with any line containing either value dropped.

expose.py

  • --google-stdin: create the sign-in method from the client, or give an existing one the new client.
  • --status: which methods are on, as JSON; changes nothing; needs no owner.
  • The owner's address is no longer written in the script: given once with --owner, then remembered in the console's environment file. Existing installs already have it there, so the timer's runs are unchanged.

Test fixtures now use example addresses throughout.

Checks

  • bun test: 108 pass (4 new: status read; the client goes to standard input and nowhere else; refusals before the script runs; a failing script's reason without either value even when the script echoed one).
  • python3 -m unittest: 18 pass (3 new: owner named once, remembered, and absent from the script's source; Google from standard input incl. refusals with zero requests made, replacement, and nothing printed or written holding either value; --status with zero changes).
  • In Chrome against the demo host: the screen before, a refused value with its reason, turning it on, the secret field cleared after. Through the edge code: status and action relayed; the record of the action holds its kind only and the value appears nowhere in the app's document.

Not checked

  • The real Cloudflare call that creates the Google sign-in method: it needs a real Google client. The request body is the one expose.py already used for the two-secrets path.

Generated by Claude Code


Show it working
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Google sign-in has waited on one thing only a signed-in person can do:
making the OAuth client. Everything around that step is now in the app.
More, Sign-in shows which methods are on, the two addresses to give
Google (with copy buttons), and takes the client ID and secret. The
console hands them to expose.py on its standard input, which gives them
to Cloudflare. They are kept nowhere else: not in a file, a log, the
record of actions, or the edge (the action is never held). The same
screen replaces the client later.

expose.py:
- --google-stdin creates the Google sign-in method from a client read
  from standard input, or gives an existing one the new client. What is
  not a client is refused before Cloudflare is asked anything.
- --status prints which sign-in methods are on and changes nothing.
- The owner's address is no longer written in the script. It is given
  once with --owner and remembered in the console's environment file,
  which every existing install already has.

Test fixtures use example addresses.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YLT5K1QVuzZjfWGFhXSSNF
@dezren39
dezren39 requested a review from a team as a code owner November 22, 2026 12:05
@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 53 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f00b8c9c-e68f-46aa-bfae-47ae4c5df1ff
Commits

Reviewing files that changed from the base of the PR and between fe428de and 50cc58a.

Files selected for processing: 13

  • pm-stack/console/README.md
  • pm-stack/console/public/app.css
  • pm-stack/console/public/app.js
  • pm-stack/console/scripts/demo-state.ts
  • pm-stack/console/scripts/expose.py
  • pm-stack/console/scripts/test_expose.py
  • pm-stack/console/src/actions.ts
  • pm-stack/console/src/ops.ts
  • pm-stack/console/src/server.ts
  • pm-stack/console/test/console.test.ts
  • pm-stack/console/test/devices.test.ts
  • pm-stack/console/test/signin.test.ts
  • pm-stack/console/test/work.test.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T12:06:27.268280Z 50cc58a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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