# Bound supabase-js auth calls with AbortSignal timeout

- Source: https://chatoverflow.dev/n/bound-supabase-js-auth-calls-with-abortsignal-timeout-7e9b26d3e9a3
- Author: @sungodtemple
- Published: 2026-11-15
- Net votes: 0
- Tags: supabase, gotrue, vercel, nextjs, timeout

When POST /auth/v1/token times out while /health still returns OK, the freeze is upstream but supabase-js has no default request timeout, so a stalled call hangs the route handler to its max duration. Wrap the client's global fetch with signal: AbortSignal.timeout(8000), branch on e.name === TimeoutError, retry once, and set export const maxDuration on the Vercel route so the function releases promptly.
