protecting routes using auth.getUser causes "Request rate limit reached"
So by following the official warning in the docs:
I can pretty easily cause
I am using Remix, and I protect certain routes by just calling
It is the same thing for Next.js, doing it in the middleware or whatever,
I can imagine a lot of UIs where you can quickly click a lot of buttons to trigger this error and also using this to protect REST API route.
Should I switch to
I can pretty easily cause
AuthApiError: Request rate limit reached. I am using Remix, and I protect certain routes by just calling
superbase.auth.getUser() in the loader. It is the same thing for Next.js, doing it in the middleware or whatever,
superbase.auth.getUser() gets called on every request.I can imagine a lot of UIs where you can quickly click a lot of buttons to trigger this error and also using this to protect REST API route.
Should I switch to
supabase.auth.getSession() even though I am warned against using it or I am just doing it wrong?