Skip to content

OAuth login fails with Cloudflare 403 from VPN exit IPs; corrupts subsequent claude.ai logins on same IP #80

@nardovibecoding

Description

@nardovibecoding

Hi — running into a reproducible OAuth issue from VPN exits (Japan exit, China user).

Repro:

  1. Run jcode login (Claude provider)
  2. Browser opens, I click "Authorize"
  3. Callback returns Cloudflare 403 challenge HTML instead of token:
    API Error: 403 <!DOCTYPE html><html lang="en-US"><head><title>Just a moment...</title>
    ... cf-challenge-platform / cdn-cgi/challenge-platform ...
    
  4. After this failure, Claude Code (separate official CLI) on the same machine also fails to log in until I cycle the VPN to a fresh exit IP. Then both work again.

What I think is happening:

  • jcode's OAuth callback request appears to trip Cloudflare's bot rules (possibly missing browser-like headers / suspicious UA / different request shape than claude.ai's web flow)
  • One failed handshake puts the IP on a CF strike list, which then blocks all OAuth (including the official Claude Code CLI) from that IP for some cooldown window
  • Cycling VPN exit IP = fresh reputation = both work

Ask:

  • Could the Claude OAuth callback path be made to mirror claude.ai web more closely (User-Agent, Accept, Sec-Fetch-* headers)?
  • Or is there a way to opt into the same browser-handoff pattern Claude Code uses (where the browser does the full flow and the CLI just receives the token via localhost callback, never touching CF directly)?

Version: v0.11.1 (1f622e6b), macOS arm64.

Happy to capture more detail (full request headers from the failing callback, etc.) if useful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions