Reference
Remy Reference/interface/auth.getCurrentUser
?

auth.getCurrentUser

Read the current user synchronously.
auth.getCurrentUser() → AppUser | null

Reads the current session's user synchronously, through getCurrentUser() or the currentUser getter. Returns the AppUser when signed in, null when not. To keep a UI in sync on its own, subscribe with onAuthStateChanged instead of reading this once at render.

Usage
const user = auth.getCurrentUser(); // AppUser | null
const same = auth.currentUser;      // sync getter, same value