You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is probably minor issue, but in cross-origin setups, the default configuration of supabase/auth does not work properly with relatively new versions on supabase/auth-js. #1377 introduced handling of X-Supabase-Api-Version header as a mechanism to choose corresponding API version, and in auth-js the client-side of this was implemented in supabase/auth-js#855.
Notice however, that this new header is not present in default CORS config in auth, as defined in internal/api/api.go line 289 thus not present in Access-Control-Allow-Headers header that supabase/auth sends. This breaks existing cross-origin setups if you update to versions past PRs mentioned.
There is simple fix of adding GOTRUE_CORS_ALLOWED_HEADERS=X-Supabase-Api-Version to environment variables, it is however not documented.
Therefore I'd suggest either adding "X-Supabase-Api-Version" (or APIVersionHeaderName) to default allowed headers for CORS, or add GOTRUE_CORS_ALLOWED_HEADERS env variable information to README (or both).
Thank you for all the great software,
BR,
ympek
The text was updated successfully, but these errors were encountered:
Hello everyone,
This is probably minor issue, but in cross-origin setups, the default configuration of
supabase/auth
does not work properly with relatively new versions onsupabase/auth-js
. #1377 introduced handling ofX-Supabase-Api-Version
header as a mechanism to choose corresponding API version, and inauth-js
the client-side of this was implemented in supabase/auth-js#855.Notice however, that this new header is not present in default CORS config in
auth
, as defined in internal/api/api.go line 289 thus not present inAccess-Control-Allow-Headers
header thatsupabase/auth
sends. This breaks existing cross-origin setups if you update to versions past PRs mentioned.There is simple fix of adding
GOTRUE_CORS_ALLOWED_HEADERS=X-Supabase-Api-Version
to environment variables, it is however not documented.Therefore I'd suggest either adding
"X-Supabase-Api-Version"
(orAPIVersionHeaderName
) to default allowed headers for CORS, or addGOTRUE_CORS_ALLOWED_HEADERS
env variable information to README (or both).Thank you for all the great software,
BR,
ympek
The text was updated successfully, but these errors were encountered: