Relative Content

Tag Archive for reactjsfirebasenext.js

Firebase auth provider user is null in my ACL Authguard

I’m having a few problems making my custom firebase provider work on my nextjs website. For example, why is user null in AuthGuard, but it’s not null in firebaseAuthContext. How can I make these two work together when the user i get is always null in AuthGuard, but not in the provider (firebase provider which i custom made). Thank you very much for the help

Using firestore onSnapshot with nextjs for realtime updates

I want to fetch user data from firestore using onSnapshot based on cookies session id and display info about this user on web with realtime changes. But if i try to use this snapshot data in useEffect it throws a error cause useEffect() is only available in client components and cookies().get() is making it a server component.
Is there any way to get server side cookies because i have http only cookies for auth and then use useEffect() with useState() for realtime data

Using firestore onSnapshot with nextjs for realtime updates

I want to fetch user data from firestore using onSnapshot based on cookies session id and display info about this user on web with realtime changes. But if i try to use this snapshot data in useEffect it throws a error cause useEffect is only available in client components and cookies().get() is making it a server component.

Next.js site reloading on every page when i deployed it on firebase

Next.js site reloading on every page or routes when i deployed it on firebase.
This problem isn’t occuring when deployed on vercel and even not occur when I upload static files out folder in cpanel of godaddy.
Can
I don’t why is this problem is occuring, I have also tried trailing slash true in next.config.js