[BUG] Claude Code Oauth issues
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [x] Other: Claude Code
- Claude CLI version: 1.0.51 (Claude Code)
- Operating System: Windows 11 (Regardless of architecture, same thing for x64 and for arm64)
- Terminal: Powershell, but also when in WSL
Bug Description
When trying to run /install-github-app, it always throws an Oauth error. There's also an Oauth error when authenticating with claude for the first time as well, but at least in that case you can still copy and manually go to the URL directly, then paste back in the code. However, when running it as /install-github-app, it also fails the initial Oauth browser redirect and lets you copy the URL to go to as a backup...but provides no way to paste the resulting code in to continue the process.
Steps to Reproduce
- Run
claude - In the Claude code terminal, run /install-github-app, choose the repository, and install the Github app. Choose API Key > Create a long-lived token with your Claude subscription.
- A browser opens with a truncated URL. We get an error page that says
Invalid OAuth Request: Missing client_id parameter - Manually copy the URL in the terminal. Fix the URL (e.g. remove the extra | and spaces from copying)
- Successfully authenticate and receive a code to enter back in.
- ....There is no place to paste the code in the terminal. Can only cancel and is unable to proceed with the authentication flow.
Expected Behavior
- The URL we are redirected to initially in the browser should just work.
- If that fails, we should be able to copy the URL from the terminal without having to fix the formatting errors (e.g. the extra | and spaces that divide up the url)
- We should also be able to paste in the resulting code after successful authentication to continue the flow/process.
Actual Behavior
- The initial redirected page in the browser fails/shows an oauth error.
- When copying the URL we are told to go to in the terminal, it includes extra spaces and | symbols that mess up/cause an invalid URL.
- When a correct Oauth URL is used, we get an authentication code, but have no where to paste it to continue the authentication in the terminal.
Additional Context
<img width="939" height="682" alt="Image" src="https://github.com/user-attachments/assets/cc715a73-3146-4735-b6d9-c6f3532486e1" />
<img width="843" height="434" alt="Image" src="https://github.com/user-attachments/assets/ff739e6f-4512-4548-b03d-99c11ff3391c" />
9 Comments
Duplicate of #3371
Same problem
Same issue on mac
same issue
This should be resolved in upcoming release v1.0.54.
Any ETA of 1.0.54 @ant-kurt?
1.0.54 released a couple hours ago, with fixes for the OAuth browser flow. There's still no place to paste for the
/install-github-appflow, but we're working on that!Solution: Using Direct Authentication URL
Steps:
Navigate to the terminal panel at the bottom of VS Code
Look for the message: "Browser didn't open? Use the url below to sign in:"
Copy the complete URL displayed below the message
The URL should start with: https://claude.ai/oauth/authorize?code=true&client_id=...
Paste the copied URL directly into your web browser
Complete the OAuth authentication flow with your Anthropic account
After successful browser authentication
Copy the verification numbers from the text field
Paste them into the VS Code terminal
The extension should now be properly authenticated
Why This Works:
The extension's automatic browser opening mechanism sometimes fails to include required OAuth parameters, but the manual URL contains all necessary authentication data.
Alternative Solutions:
If the above method doesn't work, try these options:
Complete VS Code restart and retry the process
Uninstall and reinstall the Claude Code extension
Clear VS Code cache and restart the application
Note: This solution has been tested and works reliably when the automatic OAuth flow fails.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.