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

  1. Run Claude Code inside a Docker container (e.g., node:20-slim based image)
  2. Run claude auth login
  3. The OAuth URL is displayed correctly
  4. Open the URL in a browser on the host machine and authenticate
  5. Browser shows an authorization code at platform.claude.com/oauth/code/callback
  6. 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

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗