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

Running auth.api.getUser() on every request? #37

Open
enyo opened this issue May 12, 2022 · 1 comment
Open

Running auth.api.getUser() on every request? #37

enyo opened this issue May 12, 2022 · 1 comment

Comments

@enyo
Copy link

enyo commented May 12, 2022

On this line the auth.api.getUser() function is invoked on every request. Isn't that an issue when building the app that this will run for every call? Is that the recommended way from supabase?

@one-aalam
Copy link
Owner

Hey @enyo, this will run only if Supabase token is discovered in the cookie, and it will only be discovered when the user is successfully logged in. Given, a user is logged in the full user object could be required at any point of time in the code that runs on the server for Auth N/Z.

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

2 participants