Skip to content

CLI registry URL doesn't follow redirects for auth #24

@crtahlin

Description

@crtahlin

Description

clawhub.ai redirects to www.clawhub.ai (HTTP 307), but the CLI doesn't follow this redirect for authentication requests, causing "Unauthorized" errors.

Steps to Reproduce

npx molthub@latest login --token "valid_token" --no-browser
# Result: Unauthorized

npx molthub@latest login --token "valid_token" --no-browser --registry "https://www.clawhub.ai"
# Result: Success

Root Cause

curl -I https://clawhub.ai/api/v1/me
# HTTP/2 307 → Location: https://www.clawhub.ai/api/v1/me

The CLI doesn't follow this redirect for auth verification.

Impact

Users get confusing "Unauthorized" errors with valid tokens. Must manually specify --registry flag.

Suggested Fix

Either:

  1. Follow redirects for all requests including auth
  2. Default to www.clawhub.ai
  3. Provide clearer error: "Registry redirected to X, retry with --registry X"

Found during seller flow UX testing

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions