Skip to content

readm3 login: OAuth 2.1 via @profullstack/auth-system, works over SSH (v0.14.0) - #33

Merged
ralyodio merged 1 commit into
mainfrom
worktree-cli-oauth21-login
Oct 19, 2026
Merged

ralyodio merged 1 commit into
mainfrom
worktree-cli-oauth21-login

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

readm3 login --coinpay redirected the browser to http://127.0.0.1:PORT/callback, a dead end when the CLI runs over SSH on another box.

  • readm3 is its own OAuth 2.1 server via @profullstack/auth-system/oauth2 (SQLite store, client readm3-cli): /.well-known/oauth-authorization-server, /oauth/authorize (consent; signed-out → /account?next=), /oauth/token, /oauth/revoke, /oauth/cli (paste-the-code page).
  • readm3 login uses @profullstack/auth-system/cli: loopback when a local browser can open, otherwise prints the link and takes the pasted code. --no-browser forces it; --coinpay is the same sign-in.
  • API + sync API accept r3_at_ bearers; tokens refresh on each command (single-flight); logout revokes server-side.
  • Old coinpay/oauth/cli-exchange kept for pre-0.14 CLIs.

Tests: new server/test/oauth.test.ts drives the real CLI over the SSH path (consent, CSRF origin check, paste, whoami, refresh rotation, reuse revocation, logout, bad redirect_uri) under Bun and Node. 65/65 server, 178/178 CLI, typecheck clean.

🤖 Generated with Claude Code

@socket-security

socket-security Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​profullstack/​auth-system@​0.8.37810010092100

View full report

@ralyodio
ralyodio force-pushed the worktree-cli-oauth21-login branch from 8aeb082 to e93161d Compare October 19, 2026 13:08
… (v0.14.0)

readm3 login --coinpay sent the browser to http://127.0.0.1:PORT/callback, which is a
dead end when the CLI runs on another machine (SSH). readm3 is now its own OAuth 2.1
authorization server (@profullstack/auth-system/oauth2 on a SQLite store): code + PKCE
S256, rotating refresh tokens with reuse revocation, RFC 8414 metadata. readm3 login
uses auth-system/cli: loopback when a browser can open locally, otherwise /oauth/cli
shows a code to paste back. Tokens refresh on every command; logout revokes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ralyodio
ralyodio force-pushed the worktree-cli-oauth21-login branch from e93161d to 7d7fb26 Compare October 19, 2026 13:32
@ralyodio
ralyodio merged commit 1ce2b3f into main Oct 19, 2026
8 of 9 checks passed
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