Skip to content

feat: Codex provider — OAuth device-code flow UI in TUI #4

Open

Description

@EngineerProjects

Summary

The Codex provider uses an OAuth device-code flow for authentication (no static API key).
The TUI currently has no UI for this — users must authenticate out-of-band.
This issue adds a dedicated auth panel in the TUI that guides the user through the flow.

Backlog — pick up after the multi-agent foundation (#1 #2 #3) is stable.

Proposed flow

  1. User selects Codex in the model selection panel
  2. TUI detects no stored token → opens a DeviceAuthPanel overlay
  3. Panel shows the device code + verification URL (copyable)
  4. Background goroutine polls the OAuth token endpoint
  5. On success → store token in credentials DB → close panel → activate Codex

Acceptance criteria

  • DeviceAuthPanel overlay with code + URL display
  • ctrl+c to copy the URL to clipboard
  • Auto-close on successful token exchange
  • Token stored encrypted in SQLite credentials DB under oauth_token:codex
  • Graceful timeout message if device code expires (typically 15 min)

Activity

  1. added
    enhancement
    on Jun 4, 2026
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

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions