Skip to content
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

Need update since supabase v2.43.1 now contains a change to ignore 403 setSession error #54

Closed
Revarh opened this issue May 7, 2024 · 5 comments

Comments

@Revarh
Copy link
Contributor

Revarh commented May 7, 2024

Hello RA team,

Supabase update their authSystem last week resulting in throwing a 403 error instead of a 401+logout as before.
It makes that when we connect, sometimes we get stuck in a limbo between trying to connect and accessing React-Admin.

I addressed that issue to Supabase team and this is their answer:

**This error is returned when we detect that the session_id claim in the access token doesn't exist in the auth.sessions table. It was introduced in this PR (supabase/auth#1538) because we realised that we were returning the wrong error when the session is missing. Before this PR was merged, the sign out API would return a panic and fail silently, returning a 5xx error to the client which can't be handled.

You can fix this by doing either one of these options:

  1. Manually ignore 403s returned from signOut and just clear the local session stored on the browser.
  2. Upgrade to supabase-js v2.43.1 which contains the changes to ignore 403s returned by the signOut method**

We cannot update supabase-js since ra-supabase uses it as a peer dependency.
That why it would be much appreciated if you guys could update ra-supabase to include that important new supabase-js version.

Kind regards,

@djhi
Copy link
Collaborator

djhi commented May 7, 2024

Hi! Thanks for the heads up. Can you open a PR?

@Revarh
Copy link
Contributor Author

Revarh commented May 7, 2024

Sure. It's done :)

@oddmutou
Copy link

@djhi
Hello.
Would you release new version with this change? ( PR #55 )
This issue is critical for us and many users.

@slax57
Copy link
Contributor

slax57 commented May 31, 2024

@oddmutou Yes we'll plan to make a release very soon, thanks for the reminder!

@slax57
Copy link
Contributor

slax57 commented May 31, 2024

Fixed by #55

@slax57 slax57 closed this as completed May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants