[BUG] OAuth callback redirects to localhost:PORT/callback in production instead of claude.ai

Status Open
Maintainer reply None cached
Activity 1 comment · opened Sep 9, 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?

After authorizing Claude Code to access my Claude Chat Account ("claude.ai/oauth") through the secure link sent via email (subject: "Sign in to Claude.ai Click the button below to complete your sign-in. This link expires in 10 minutes."), I am being redirected to the localhost domain in production (localhost:64614/callback). This is likely caused by an incorrect Auth0 configuration.

What Should Happen?

After authorizing Claude Code to access my Claude.ai account via the OAuth link sent by email, I should be redirected back to the correct production domain (e.g., claude.ai or the properly configured production callback URL), not to localhost:64614/callback, which should only be used in a local development environment.

Error Messages/Logs

Steps to Reproduce

  1. Receive the email with the subject "Sign in to Claude.ai Click the button below to complete your sign-in. This link expires in 10 minutes.", containing the secure link to authorize Claude Code.
  2. Click the link to open the Claude.ai OAuth authorization page (claude.ai/oauth).
  3. Authorize Claude Code to access the Claude Chat Account.

<img width="1901" height="975" alt="Image" src="https://github.com/user-attachments/assets/c9e65ab3-1736-4df6-9e52-99b2e8047be2" />

Observe that, after authorization, the browser is redirected to localhost:64614/callback instead of the expected production domain.

<img width="1917" height="976" alt="Image" src="https://github.com/user-attachments/assets/5b34c02d-1446-48f4-9f9b-3926a0958686" />

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

v2.1.267

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗