Skip to content

Proxy configured with Github failing on callback #26

@pragmaticivan

Description

@pragmaticivan

Version

Latest docker image.

URL:

http://localhost:8080/callback?code=REDACTED&state=REDACTED

Response:

{
  "error": "invalid_grant",
  "error_description": "Failed to exchange authorization code"
}

Logs:

mcp-auth-proxy-1  | 140.82.113.4 - - [17/Sep/2025:16:57:12 +0000] "POST / HTTP/1.1" 401 77
mcp-auth-proxy-1  | 140.82.113.4 - - [17/Sep/2025:16:57:12 +0000] "GET /.well-known/oauth-protected-resource HTTP/1.1" 200 134
mcp-auth-proxy-1  | 140.82.113.4 - - [17/Sep/2025:16:57:12 +0000] "GET /.well-known/oauth-authorization-server HTTP/1.1" 200 638
mcp-auth-proxy-1  | 140.82.113.4 - - [17/Sep/2025:16:57:15 +0000] "GET /authorize?client_id=REDACTED&response_type=code&code_challenge=REDACTED&code_challenge_method=S256&scope=email&resource=http%3A%2F%2Flocalhost%3A8080&redirect_uri=http%3A%2F%2F127.0.0.1%3A33418%2F&state=REDACTED%2BQQ%3D%3D HTTP/1.1" 302 288
mcp-auth-proxy-1  | 2025/09/17 16:57:21 Failed to exchange code for token: oauth2: cannot fetch token: 403 Forbidden
mcp-auth-proxy-1  | Response: Cookies must be enabled to use GitHub.

^ Testing with Copilot/VSCode

Also MCP_SERVER_URL="http://test-mcp:8000" is set. I tried to change this to http://test-mcp:8000/mcp but it fails to boot.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions