AI & Agent Dev Bug Sandbox logo
AI & Agent Dev Bug Sandbox
Back to Radar

Discord OAuth Callback Hangs Due To Missing Timeout On External HTTP Requests In GoTrue

Discord OAuth login consistently takes 5+ seconds per step. Auth logs show extreme durations (up to 16+ hours for /authorize), indicating GoTrue workers are blocking on external Discord API calls without a timeout, exhausting connection pool and serializing OAuth flows.

highConfidence 72%GoTrue

Origin Analysis

GoTrue's OAuth flow does not set a request timeout when exchanging the authorization code or fetching user data from Discord, allowing slow or hung HTTP calls to block auth workers and degrade the entire OAuth pipeline.
1. Navigate to https://southside-whitelist-application.vercel.app/auth 2. Click 'Login with Discord' 3. Observe Discord consent screen appears after 5+ seconds 4. Complete Discord authorization 5. Observe callback to app takes another 5+ seconds

Fixing Code Block

Edge Case Audit

If Discord's API occasionally exceeds 10 seconds, users will see OAuth failures instead of slow logins. Set the timeout to a value above your provider's p99 latency (e.g., 15s) and monitor error logs. For managed Supabase projects, this patch applies only to self-hosted GoTrue; managed users should open a support ticket. Rollback by reverting the diff if timeout-related errors increase significantly.

Ecosystem Topology

Agent Frameworks

LangChain, LlamaIndex, and Pydantic

  1. highProperty graph relation keys collide when entity IDs or labels contain underscores
  2. highCodeActAgent drops assistant tool-call metadata during handoff, leaving an orphan tool response
  3. high[Bug]: HierarchicalNodeParser async methods return the documents unsplit
  4. highLLM.predict_and_call fails with ValidationError for non-function-calling models when react_chat_formatter is omitted
  5. highAnthropic streaming server-tool input_json_delta overwrites completed client tool_use arguments due to stale cur_tool_call state