claude-code - 💡(How to fix) Fix [BUG] OAuth login fails - "Missing code_challenge" / Invalid OAuth Request on Max subscription [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#45340Fetched 2026-04-09 08:07:36
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
0
Author
Timeline (top)
labeled ×2commented ×1

Error Message

Error Messages/Logs

Fix Action

Fix / Workaround

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

Code Example

Invalid OAuth Request - Missing code_challenge parameter
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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" />

extent analysis

TL;DR

The OAuth login issue can be resolved by modifying the generated OAuth URL to remove invalid parameters.

Guidance

  • Verify that the issue is specific to the Max subscription on Ubuntu Linux by testing with a different subscription or operating system.
  • Manually edit the OAuth URL as described in the workaround to confirm that it resolves the issue.
  • Check the Claude Code documentation to see if there are any known issues or updates related to OAuth login with the Max subscription.
  • Test the OAuth login process with a different Claude Model to determine if the issue is model-specific.

Example

No code snippet is provided as the issue is related to the generated OAuth URL and not a specific code implementation.

Notes

The issue is reported as a regression, indicating that it worked in a previous version of Claude Code. However, the last working version is not specified.

Recommendation

Apply the workaround by manually editing the OAuth URL to remove the invalid parameters, as this has been confirmed to resolve the issue. This is a temporary solution until the root cause can be identified and fixed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING