Skip to content

CLI login returns Unauthorized despite successful browser auth #41

@levineam

Description

@levineam

Environment

  • clawdhub CLI version: 0.3.0
  • OS: macOS
  • Node: v24.9.0

Description

Browser OAuth flow completes successfully ("Logged in. You can close this tab.") but the CLI returns an Unauthorized error.

Steps to Reproduce

  1. Run clawdhub login
  2. Browser opens, authenticate successfully
  3. Browser shows "Completing login… Logged in. You can close this tab."
  4. CLI returns: ✖ Unauthorized / Error: Unauthorized

Expected Behavior

CLI should receive the token and write it to config.

Actual Behavior

Token never reaches CLI. Config file remains without a token:

{
  "registry": "https://clawdhub.com"
}

Troubleshooting Attempted

  • No CLAWDHUB env vars set
  • Cleared config file and retried
  • Tried with explicit flags: clawdhub login --site https://clawdhub.com --registry https://clawdhub.com
  • Tried with DEBUG=* — no additional output

Notes

The browser-side auth succeeds (confirmed by the "Logged in" message), so the issue appears to be in the CLI callback handler receiving or validating the token.

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