Skip to content

feat(oauth): implement redirect flow for device authorization #368

@nycomp

Description

@nycomp

Goal

Complete the OAuth 2.0 Device Authorization Flow (RFC 8628) by implementing the redirect flow after user authorization.

Current State

  • Device code endpoint (/auth/v1/oauth/device_authorize) works ✅
  • Token endpoint (/auth/v1/oauth/token) with polling works ✅
  • Verification page exists at /auth/v1/oauth/device
  • User can submit user code and authorize ✅

Missing

After the user authorizes the device code, the verification page needs to:

  1. Show success message - "Authorization complete! You can close this page and return to the CLI."
  2. Auto-close (optional) - Use JavaScript to close the window after showing success
  3. Handle errors gracefully - Show clear messages for expired/denied codes

Reference

Acceptance Criteria

  • Verification page shows clear success message after authorization
  • Error states (expired, denied) show user-friendly messages
  • Page works without JavaScript (progressive enhancement)
  • Optional: Auto-close window after successful authorization

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    Open

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions