Skip to content

auth: CLI OIDC login — loopback listener and device authorization grant (S-N2 remainder) #461

Description

@justin13888

The remainder of S-N2 after #407 (PR #459), which delivers the server relying party (S-N1) and the SDK half of the login flow (AuthClient::begin_oidc_login / complete_oidc_login).

What is owed

  • capsule auth login --oidc — a loopback listener in the CLI (capsule-cli/src/oidc.rs): bind an ephemeral 127.0.0.1 port, call begin_oidc_login with http://127.0.0.1:{port}/callback (admitted by OIDC_ALLOW_LOOPBACK_REDIRECT, on by default), open the authorization URL in the browser, receive the redirect, and call complete_oidc_login(state, code). Needs a decision the docs do not carry yet: the browser-open policy (print the URL, or shell out) and the listener's timeout.
  • The device authorization grant (RFC 8628) for headless CLI use — POST /v1/auth/oidc/device and a poll route, with an OidcDeviceStore beside OidcAuthorizationStore, and the provider-side polling. Also undesigned in design/authentication.md.
  • cli.auth.login.oidc_* locale keys and a capsule auth login --oidc round trip against the dex service capsule-server/compose.yaml ships.

SLICES.md S-N2 reads part until this lands.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions