Skip to content
Discussion options

You must be logged in to vote

Architectural Diagnosis & Root Cause Analysis

The symptoms you are observing (GET /auth/v1/user returning HTTP 500 accompanied by a browser CORS error) are closely linked and stem from how Supabase Auth (GoTrue) handles user retrieval and how the upstream API Gateway manages error responses.


1. Why GET /auth/v1/user Returns HTTP 500

In the Supabase Auth architecture (GoTrue), the endpoint GET /auth/v1/user executes the following internal flow:

  1. Authentication Middleware (requireAuthentication):
    GoTrue extracts and validates the Bearer JWT from the incoming request headers.
  2. User & Session Loading (maybeLoadUserOrSession):
    Once the JWT signature and claims are verified, GoTrue invokes mode…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mmanresah
Comment options

Answer selected by mmanresah
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants