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

Supabase OAuth Authorization Request Expires Too Quickly During Dyad Integration

When using Dyad integration, the OAuth authorization request generated by Supabase expires before the user can complete the authorization, resulting in 'authorization request expired' error.

highConfidence 65%Supabase@supabase/supabase-jsPostgreSQLsupabase-js

Origin Analysis

The OAuth state parameter stored by Supabase GoTrue has a very short expiration time (default 5 minutes) and is validated using absolute time comparisons. This causes the state to be considered expired immediately when the user clicks the authorization button, likely due to clock skew between the Dyad server and Supabase or an overly aggressive expiry policy.
1. In the Dyad AI editor, initiate the Supabase integration using the `<dyad-add-integration provider="supabase"></dyad-add-integration>` command. 2. Click the 'Add Supabase Integration' button that appears in the Dyad UI. 3. Observe the error message 'This authorization request is expired' shortly after clicking the button, preventing successful connection.

Fixing Code Block

Edge Case Audit

Extending the expiry window increases the risk of OAuth state replay attacks if an attacker intercepts the state parameter. The clock skew tolerance should be carefully tuned and not exceed the maximum expected drift. In multi-instance or distributed deployments, ensure all Supabase instances have synchronized clocks (e.g., using NTP). Rollback can be performed by reverting the expiry to 5 minutes and removing the skew tolerance, but will reintroduce the original issue if clock skew is the root cause.

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