-
Bug report
Describe the bugCalling supabase.auth.getUser() using the createServerClient with the @supabase/ssr package on every page route in Next.js middleware causes noticeable lag, especially on slow networks. To ReproduceCreate a Next.js app with middleware as shown in the supabase documentation. Expected behaviorI expected the route transitions to be smooth and not experience noticeable lag, even on slower network connections. System information
Additional contextAdd any other context about the problem here. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 16 replies
-
Hi @filigreti! Moved this to a discussion because the instructions and SDK work as intended, but there are certain mitigations you can try:
Any route that requires a Supabase call (i.e., requires going through the middleware) is already making that call (and probably other calls) to begin with, so there are probably other reasons causing the slowdown as well. You can look into ways to increase the perceived speed of the response, for example via transitions |
Beta Was this translation helpful? Give feedback.
Hi @filigreti! Moved this to a discussion because the instructions and SDK work as intended, but there are certain mitigations you can try: