-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
exchangeCodeForSession
throws error instead of returning
#782
Comments
In my opinion, there are two problems:
In both cases 1 and 2, you will not be able to set finally, the I think this is the reason why @probablykasper @saltcod |
Is there any update, I am still getting the same error, everything works fine locally but I get the same error in deployment |
No update afaik. Not really sure what you mean, maybe you misunderstood this issue. Is your error being thrown or returned? |
its being thrown |
I was getting this error when accessing my local host from http:https://localhost:3000 but the generated link was http:https://192.168.x.x.:3000/. I synced up these variables in my client, server env, native env, and then it all came together. |
+1, just realized there is suddenly a 500 on the login redirect |
This is a problem, it breaks the error design pattern for the rest of the API methods in the Supabase JS SDK. Please fix! |
+1, I'm also getting this error. I just followed the docs |
same |
Thanks man! That helped me :) |
I ran into this issue too and realized it's the bug on my end that the original url and redirect url is not with the same domain. Agreeing with others that when this happens the function should return an error instead of throwing |
Bug report
Describe the bug
When users log in using PKCE and click the email login link in a different browser, you get this
AuthApiError
:I believe that's expected, but the error is thrown instead of returned from
exchangeCodeForSession()
.To Reproduce
Expected behavior
Since it's a expected and fairly common error, this error should be returned so that it can be properly handled
Screenshots
If applicable, add screenshots to help explain your problem.
System information
The text was updated successfully, but these errors were encountered: