Replies: 1 comment 1 reply
-
I don't know if it is related to your issue, but I am mentioning it anyway because I think it might be potentially problematic: as soon as you open the website you sent, hundreds of requests are made in an infinite loop to the address https://lkivpecufdvxrzrijuat.supabase.co/rest/v1/user_reviews?select=*&tool_name=eq.Clarity+AI&approved=eq.true. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone,
I'm experiencing an issue with NextAuth in my Next.js application. The session status gets stuck at the loading state, and the spinner appears indefinitely in the main navigation bar, but only on the home page.
Setup:
I have a
<MainNav />
component in my app, as shown below:main-nav.tsx:
In the
<MainNav />
, I render the<UserAccountNav />
component, as shown below:user-account-nav.tsx:
In the
<UserAccountNav />
component:loading
, I render a loading spinner.authenticated
, I render a<UserAvatar />
component.unauthenticated
, I render aLogin
link.Here is the
<NextAuthProvider />
component:next-auth-provider.tsx
And here is the root layout of my app:
/app/layout.tsx
The Issue:
When I first load the home page, the session status remains
loading
and the spinner in the main nav is displayed indefinitely.To see this in action, visit indieaitools.com. In the main nav bar, to the right, you will see a loading spinner. Even if you refresh the page multiple times, you will still see the spinner.
Now, if you visit a different page, the loading status correctly updates. To see this in action, visit https://indieaitools.com/tools?name=MakeAudio, and you will see a
Login
link in the main nav bar. Now come back to the home page, and you will see theLogin
link. The session status updates correctly. So, this problem appears only when I visit the home page for the first time.Does anyone know why this might be happening or how to fix it?
Thanks in advance for your help!
Version Info:
Beta Was this translation helpful? Give feedback.
All reactions