claude auth login does not show prompt for authorization code in Docker containers
Resolved 💬 5 comments Opened Mar 3, 2026 by fumiakisato19790426 Closed Apr 2, 2026
Description
When running claude auth login inside a Docker container (non-browser environment), the command displays the OAuth URL correctly but never shows a prompt to enter the authorization code that appears in the browser after authentication.
Steps to Reproduce
- Run Claude Code inside a Docker container (e.g.,
node:20-slimbased image) - Run
claude auth login - The OAuth URL is displayed correctly
- Open the URL in a browser on the host machine and authenticate
- Browser shows an authorization code at
platform.claude.com/oauth/code/callback - No input prompt appears in the terminal to enter this code
Expected Behavior
After displaying the OAuth URL, claude auth login should show a prompt like "Enter the authorization code:" so the user can paste the code from the browser.
Workaround
Instead of claude auth login, simply run claude while unauthenticated. The interactive session triggers a working authentication flow that properly handles code input.
Environment
- Claude Code version: 2.1.55
- Container: Docker (node:20-slim based)
- Host: macOS
- Account type: Team/corporate subscription
- Running via:
docker exec -it <container> claude auth login
🤖 Generated with Claude Code
This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗