401 error oauth not supported

Resolved 💬 9 comments Opened Aug 18, 2025 by asamagaio Closed Aug 22, 2025

Bug Description
401 error oauth not supported

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 1.0.83
  • Feedback ID: d25c4ba0-c9af-4dfa-94ca-8f0291258d27

Errors

[{"error":"Error: Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the \"X-Api-Key\" or \"Authorization\" headers to be explicitly omitted\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:950:6454","timestamp":"2025-08-18T17:51:52.856Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"OAuth authentication is currently not supported.\"}}\n    at D6.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:942:2449)\n    at sP.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:959:2101)\n    at sP.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:959:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-08-18T17:52:40.437Z"},{"error":"SyntaxError: Unexpected token 'A', \"API Error:\"... is not valid JSON\n    at JSON.parse (<anonymous>)\n    at file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:718:9932\n    at Q (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:677:13339)\n    at USB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:29738)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-08-18T17:52:40.440Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"OAuth authentication is currently not supported.\"}}\n    at D6.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:942:2449)\n    at sP.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:959:2101)\n    at sP.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:959:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async KSB.sG1.showErrors (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:24578)\n    at async sG1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:13705)\n    at async KSB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:24429)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:19524\n    at async cN0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:5164)\n    at async V01 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:19494)","timestamp":"2025-08-18T17:52:40.699Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"OAuth authentication is currently not supported.\"}}\n    at D6.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:942:2449)\n    at sP.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:959:2101)\n    at sP.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:959:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)","timestamp":"2025-08-18T17:52:44.925Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"OAuth authentication is currently not supported.\"}}\n    at D6.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:942:2449)\n    at sP.makeStatusError (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:959:2101)\n    at sP.makeRequest (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:959:5315)\n    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at async KSB.sG1.showErrors (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:24578)\n    at async sG1 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:13705)\n    at async KSB (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:24429)\n    at async file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:19524\n    at async cN0 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:5164)\n    at async V01 (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1875:19494)","timestamp":"2025-08-18T17:52:45.277Z"},{"error":"Error: 401 {\"type\":\"error\",\"error\":{\"type\":\"authentication_error\",\"message\":\"OAuth authentication is currently not supported.\"}}\n    at D6.generate (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:942:2449)

Note: Error logs were truncated.

View original on GitHub ↗

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