Next.js Discord

Discord Forum

Firebase + Nextjs example

Answered
Altered Demon posted this in #help-forum
Open in Discord
If anybody has a project which uses these 2 things, please do share. I have tried so many guides and always hit a dead end with the app router. The switching back and forth between server and client side is getting confusing with firebase in the mix.

6 Replies

@Altered Demon If anybody has a project which uses these 2 things, please do share. I have tried so many guides and always hit a dead end with the app router. The switching back and forth between server and client side is getting confusing with firebase in the mix.
firebase is a client package, firebase-admin is a server package.

so if you use firebase, ditch all server components and use client components.

if you want to use firebase-admin and integrate auth in server components, you need to use session cookies: https://firebase.google.com/docs/auth/admin/manage-cookies
Answer