Skip to content

feat(auth): add OIDC device-code login flow#7

Open
eliteprox wants to merge 2 commits into
feat/pymthouse-integrationfrom
feat/device-code-login
Open

feat(auth): add OIDC device-code login flow#7
eliteprox wants to merge 2 commits into
feat/pymthouse-integrationfrom
feat/device-code-login

Conversation

@eliteprox

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #3. Adds OIDC device-code login so CLI clients (e.g. python-gateway) can authenticate via browser approval.

  • Add device-flow.ts with cookie state and completeDashboardDeviceApproval (imports createPmtHouseClientForPublicApp from pymthouse-bff).
  • Add /api/auth/initiate-login — Pymthouse initiate-login URI entry point.
  • Add /api/auth/device/complete — POST handler after user signs in on dashboard.
  • Add /device-approved confirmation page.
  • Add /api/signer/device/exchange — device token exchange facade for CLI clients.
  • Extend LoginPage and /login route with ?flow=device handling.

Config

Register the initiate-login URI on the Pymthouse app (documented in .env.example):
https://<dashboard-host>/api/auth/initiate-login

Test plan

  • Device-flow login completes and redirects to /device-approved
  • python-gateway device flow finishes automatically after browser approval
  • /api/signer/device/exchange returns tokens for approved device codes
  • Normal /login (without ?flow=device) is unchanged

Restore device-flow support stacked on the PymtHouse integration PR:
initiate-login URI, device approval completion, device-approved page,
signer device exchange facade, and login UI branches for ?flow=device.

device-flow.ts imports createPmtHouseClientForPublicApp from pymthouse-bff
to avoid duplicating M2M client setup.
@eliteprox eliteprox requested a review from adamsoffer as a code owner June 23, 2026 00:47
@vercel

vercel Bot commented Jun 23, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dashboard Ready Ready Preview Jun 23, 2026 2:52am

Request Review

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