OAuth authentication fails in headless/Docker environments: "Redirect URI not supported by client"
Resolved 💬 4 comments Opened Mar 16, 2026 by Shelliis Closed Apr 17, 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?
When attempting to authenticate Claude Code in a Docker container (no browser available),
the OAuth flow fails with:
> Autorisierung fehlgeschlagen. Redirect URI https:/platform.claude.com/oauth/code/callback is not supported by client.
What Should Happen?
After authorizing in the browser, a code should be displayed that can be pasted back
into the terminal (as the UI suggests with "Paste code here if prompted >").
## Workaround Attempts
- Copying
~/.claude.jsonfrom an authenticated host into the container → token is
session-bound and results in "Not logged in" when making actual requests
Error Messages/Logs
Steps to Reproduce
- Run Claude Code in a Docker container without a browser (e.g., Jupyter base image)
- Select Option 1 (Claude account with subscription) or Option 2 (Anthropic Console)
- Copy the displayed authorization URL and open it in a browser on the host machine
- Log in and click "Authorize"
- → Error: "Redirect URI https:/platform.claude.com/oauth/code/callback is not supported by client"
Claude Model
None
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.76
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗