[BUG] Authorization failed: Redirect URI is not supported by client
Open 💬 16 comments Opened Mar 19, 2026 by christinalfy
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 I try to login to my Claude Pro (personal account), I'm unable to authenticate. Tried multiple times. This worked previously. Note: my work API billing account currently still works
What Should Happen?
Claude Pro should successfully authenticate
Error Messages/Logs
Authorization failed Redirect URI https:/platform.claude.com/oauth/code/callback is not supported by client
Steps to Reproduce
- claude --settings '{"forceLoginMethod":"claudeai"}' /login
- browser popup ([here](https://platform.claude.com/login?selectAccount=true&returnTo=%2Foauth%2Fauthorize%3Fcode%3Dtrue%26client_id%3D9d1c250a-e61b-44d9-88ed-5944d1962f5e%26response_type%3Dcode%26redirect_uri%3Dhttp%253A%252F%252Flocalhost%253A54134%252Fcallback%26scope%3Dorg%253Acreate_api_key%2Buser%253Aprofile%2Buser%253Ainference%2Buser%253Asessions%253Aclaude_code%2Buser%253Amcp_servers%2Buser%253Afile_upload%26code_challenge%3DNfuNMG9YjIqH7wnf_xeF2O77XdkiMtkybotrSvPprH4%26code_challenge_method%3DS256%26state%3D2Jr_CnN1Z2GOCv2v6f8foD6Mu1396zqajzPtc7azqz4))
- click Have a Max or Pro Plan? [here](https://claude.ai/oauth/authorize?code=true&client_id=9d1c250a-e61b-44d9-88ed-5944d1962f5e&response_type=code&redirect_uri=http:/localhost:54134/callback&scope=org:create_api_key+user:profile+user:inference+user:sessions:claude_code+user:mcp_servers+user:file_upload&code_challenge=NfuNMG9YjIqH7wnf_xeF2O77XdkiMtkybotrSvPprH4&code_challenge_method=S256&state=2Jr_CnN1Z2GOCv2v6f8foD6Mu1396zqajzPtc7azqz4)Note: same error if manually copying the link
- click Authorize
- Authorization failed
Redirect URI https:/platform.claude.com/oauth/code/callback is not supported by client
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.1.79 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
16 Comments
Found 2 possible duplicate issues:
This issue will be automatically closed as a duplicate in 3 days.
🤖 Generated with Claude Code
same issue on linux:
Authorization failed
Redirect URI http:/localhost:39217/callback is not supported by client.
same issue on Windows:
Authorization failed
Redirect URI http:/localhost:56877/callback is not supported by client.
Same issue on linux (nixos):
Redirect URI http:/localhost:43571/callback is not supported by client.
Ici aussi ...
Same issue now for me on MacOS
I had the same problem, I went to claude.ai and asked Claude about it. I'll include the reply below, but I didn't even need to follow it, the normal signin flow worked afterwards. Maybe I refreshed some token by going to claude.ai.
Claude's reply:
This is a known issue with the Claude Code VS Code extension's OAuth flow. The browser tries to redirect to localhost to complete the login, but if VS Code is running in a remote environment (WSL, SSH, Codespaces, etc.) or the port just isn't reachable, it fails. Here are the best workarounds:
Option 1: Use an API key instead (most reliable)
Go to console.anthropic.com and create an API key.
In the Claude Code extension or terminal, run /login and choose the API key option instead of OAuth.
Paste your key when prompted.
Option 2: Manually extract the auth code from the URL
When the browser redirects to the failing localhost URL, the URL itself contains the auth code — it looks like http://localhost:PORT/callback?code=YOUR_CODE&state=.... GitHub You can copy just the code=... value from that URL and paste it back into the VS Code terminal when prompted.
If the browser doesn't open automatically during login, press c to copy the OAuth URL to your clipboard, paste it into your browser manually, and then copy the code from the resulting URL back into the extension. Claude
Option 3: Set the API key as an environment variable
You can set ANTHROPIC_API_KEY in your environment before launching VS Code, and the extension will pick it up automatically without needing to go through the OAuth flow.
Are you running VS Code remotely? (WSL, SSH, GitHub Codespaces, etc.) — the root cause in remote environments is that the OAuth flow uses a hardcoded localhost redirect URI, which breaks when VS Code and your browser aren't on the same machine. GitHub In that case, the API key approach (Option 1) is the most straightforward fix.
Even more straight foward than the above -- manually correcting the syntax in the URI for the callback (i.e.
http:/-->http://) and trying the request again works for those still looking for a way to login successfully.re: https://github.com/anthropics/claude-code/issues/37831
"Same issue, Mac Mini macOS, Claude Code v2.1.20 and v2.1.76 both affected. 1 year paid subscriber unable to login since day one. Conversation ID: 215473502600074"
My issue was fixed after noticing and fixing extra spaces in the URL that I copied from the terminal (manually, instead of clicking
c).It is likely many of you have ssh-ed to a remote server and have copied the generated URL and pasted it instead of clicking on it (since you don't want it to open on the remote machine).
In that case, towards the end of each line, an extra space is copied. In my case "oauth" had shifted to "o auth" and thus "o+auth" in the URL that breaks things. You need to find all such cases and manually fix them and paste the corrected URL instead.
Edit: An easier fix is to temporarily minimize the font size of your terminal window/tab so that all the link fits in one line and then copy that. Definitely easier than fixing the breaking points.
I use warp terminal and yes line break = space. URL not clickable or copiable in terminal. Please rework the login system a bit
In my case it's iTerm2. I believe it applies to most terminal emulators.
The “c” to copy didn’t work, even though it said it did. Manual select of the auth request needed to be edited in a text editor to remove the new line characters
In my case since the URL was 3 lines, there an extra space
between characters in redirect URLI was able to get my Claude Code running on my Mac through the terminal window, and then modifying he re-direct adding the http:// in front of the localhost convention.
Once it authenticated in Terminal, I opened iTerm2 and opened claude and it is working without issue...
I had the same issue. Make sure to copy into a text-editor ; verify this...