-
-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
errorCode
is undefined
because data.error
is not processed
#928
Comments
Ah, by the way, a similar issue appears with
but still, the code does not make it into the error object:
|
Could it be that the API version check fails because GoTrue is not exposing the version header to the script, see: |
The Supabase auth team is aware of this issue and is tracking it on the Supabase Auth GitHub repo supabase/auth#1631 |
Hey, Thanks for flagging the issue. A fix has supabase/auth#1721 and this should be patched later this week or early next week with our next deploy Hope this helps. I'm going to close for now but feel free to re-open or head to #804 if there are any issues after upgrading. You can track the version under Settings > Infrastructure > Service Versions > Auth version. Should be good to go once your project version is v2.159.0 or later |
This is with my local
supabase start
environment (which might have an effect on the GoTrue version?):When I get an authentication failure from
auth-js
, e.g. because of an invalid password, I do not get the usefulinvalid_grant
error code but instead, it isundefined
(fromconsole.dir(error)
):This seems to be because, in
auth-js/src/lib/fetch.ts
Line 59 in f131300
and below, it is checking only for
data.code
anddata.error_code
. It seems to me thatdata.error
should be checked as well, because that is what I see in the JSON reply in the network packet:Because I am not aware what protocol version checks might be necessary, I won't try to file a pull request. (Also, I was not successful setting up a local version of
auth-js
.)The text was updated successfully, but these errors were encountered: