Currently, auth is initialized on every component that needs firebase authentication. So, on each initialization the page is rendering the authentication provider on console.
Code:
useEffect(() => {
const app = initializeApp(firebaseConfig);
const authInstance = getAuth(app); // console created from this line
setAuth(authInstance);
}, []);
Solution
Create a global context for authentication.
Currently,
auth
is initialized on every component that needs firebase authentication. So, on each initialization the page is rendering the authentication provider on console.Code:
Solution Create a global context for authentication.