Replies: 1 comment
-
On every request you update the session is also a problem. did you find a solution ? if you check the auth logs, there are a lot of request for auth/v1/request. Should we block update session ? if the session is this valid ? and do the redirecting and checks in the next middleware ? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
According to the official guide Setting up Server-Side Auth for Next.js, in step 4, there is an
await updateSession()
in middleware. Since there's a requestawait supabase.auth.getUser()
in theupdateSession
, every time I navigate to a route that matches the middlewarematcher
, there's a long time to wait — that seriously affects the user experience.Is there a better solution to this problem?
Beta Was this translation helpful? Give feedback.
All reactions