[BUG] OAuth login fails - "Missing code_challenge" / Invalid OAuth Request on Max subscription

Resolved 💬 3 comments Opened Apr 8, 2026 by prezis Closed Apr 12, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

OAuth login fails with "Invalid OAuth Request - Missing code_challenge parameter"
when using /login with Max subscription on Ubuntu Linux.

The URL generated by Claude Code contains invalid parameters that cause
claude.com to reject the request.

Workaround: manually edit the OAuth URL before opening in browser:

  1. Remove "code=true&" from the beginning of query params
  2. Remove "org%3Acreate_api_key+" from the scope parameter

This works correctly after editing.

What Should Happen?

Browser opens the OAuth authorization page, user logs in,
receives a code to paste back into the terminal, and Claude Code
authenticates successfully with the Max subscription.

Error Messages/Logs

Invalid OAuth Request - Missing code_challenge parameter

Steps to Reproduce

  1. Run /login in Claude Code
  2. Press "c" to copy the OAuth URL
  3. Paste URL in browser without modification
  4. Browser shows "Invalid OAuth Request - Missing code_challenge parameter"

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude Code 2.1.96.

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

<img width="1312" height="643" alt="Image" src="https://github.com/user-attachments/assets/89008da7-b032-4c57-a2f5-52e6e202eb49" />

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗