...We treat the Firebase JS SDK as the source of truth for auth status. When the user signs in, we call an endpoint to generate a refresh token and store the user info, ID token, and refresh token in cookies. Future requests to SSR pages receive the user info and ID token from cookies, refreshing the ID token as needed. When the user logs out, we unset the cookies. This package will likely be helpful if you're using Firebase authentication and expect to use server-side rendering—especially if you need access to Firebase ID tokens on the server side. ...