Nuxt Supabase server side #373
Unanswered
Visioneery
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi , I am a quite new to nuxt and supabase . I see that supabase is usually implemented in client side(composables and components). But isn't it a best practice to implement authentication on the server side?
I am asking because currently I have a problem when users are already signed in and they try to access /signin page , nuxt preloads /signin page for a second and then redirects user back to the index page
It does not matter if I am using navigateTo based on supabase user or session in middleware.ts , or using OnMount or WatchEffect, outcome is always the same, page is still preloaded for a half of a second.
When I tried to move signIn logic into server side I faced an issue that it is not signing in , not redirecting etc. So I assume that I am doing something wrong here.
Maybe someone knows what would be the best way to solve this issue? It would be nice to see some implementation example if possible. Thank you
Beta Was this translation helpful? Give feedback.
All reactions