Skip to content

CLI authorize page and CLI keys card (nemar-cli #1272 phase 2) #316

Closed

Description

@neuromechanist

Companion to nemarOrg/nemar-cli#1282 (epic nemarOrg/nemar-cli#1272, phase 2). The backend half shipped in nemarOrg/nemar-cli#1287 on that epic's branch (ADR 0047 there); this issue is the website half.

What

A page at /cli/authorize?code=XXXX-XXXX that lets a signed-in person authorize a CLI sign-in started by nemar auth login, and a CLI keys card in Settings for the paste-key fallback.

  • Not signed in: send the person through the existing ORCID sign-in with next carrying them back to the page with the code preserved. A brand-new ORCID creates the pending account through the existing web path.
  • Signed in: call GET /auth/device/lookup?code=, then show one confirm step that names the account (username, masked email) and the machine that asked, framed as "Did you just run nemar auth login on ?", with one Authorize button and one Deny button. Both submit as real form POSTs to POST /auth/device/confirm and POST /auth/device/deny through the same-origin proxy.
  • Every failure is one plain sentence and one next step, rendered from the shared vocabulary (shared/contract/device-auth.ts in nemar-cli): expired, already used, denied, unknown code, and the typed account refusals (pending, identity conflict; service account once phase 4 lands).
  • Settings gains a CLI keys card: list keys by name with created and last-used dates, generate a named key shown once, revoke one key. Endpoints: GET/POST /auth/keys, DELETE /auth/keys/:id.
  • machine_name is client-supplied text and must be escaped.

Definition of done

Activity

  1. neuromechanist commented on Sep 7, 2026

    @neuromechanist
    ContributorAuthor

    Merged into staging by #317 (squash e26bd0e), deployed to test.nemar.org by the staging workflow. Review fixes landed in the same PR. The staging walk-through with a real ORCID account waits for the backend routes on api-test.nemar.org, which deploy from nemar-cli dev; it will be recorded on nemarOrg/nemar-cli#1282 once the epic branch lands there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions