How the pieces connect
The split runs along the server/client boundary. In the browser, the firebase client SDK handles the interactive parts: signInWithEmailAndPassword, onAuthStateChanged, and real-time onSnapshot listeners that keep client components live. On the server, the firebase-admin SDK runs inside Server Components and Route Handlers with full privileges via a service account.
The bridge between them is the session cookie. After a client login, you send the Firebase ID token to a Route Handler, which calls admin.auth().createSessionCookie(idToken, { expiresIn }) and sets it as an httpOnly cookie. On every server render, admin.auth().verifySessionCookie(cookie, true) decodes that cookie and tells you who the user is — no client SDK on the server, no exposed credentials. Server Components read Firestore through the Admin SDK; client components subscribe through the client SDK.