?
auth.isAuthenticated
Whether a session is active.
auth.isAuthenticated() → boolean
Returns a synchronous boolean for the current session: true once a code or delegated sign-in has settled, false when signed out. To keep the UI updated on its own, subscribe with onAuthStateChanged rather than reading this once at render.
Usage
if (!auth.isAuthenticated()) navigate('/login');