Firebase + Nextjs example
Answered
Altered Demon posted this in #help-forum
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.
Answered by B33fb0n3
This is one example of firebase + nextjs app router + auth:
https://github.com/lucas-barake/nextjs-app-router-firebase-auth
You can find [more here](https://www.google.com/search?q=nextjs+firebase+app+router+site%3Agithub.com&rlz=1C1CHBF_deDE1109DE1109&oq=nextjs+firebase+app+router+site%3Agithub.com&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCDkyMTZqMGo3qAIAsAIA&sourceid=chrome&ie=UTF-8)
https://github.com/lucas-barake/nextjs-app-router-firebase-auth
You can find [more here](https://www.google.com/search?q=nextjs+firebase+app+router+site%3Agithub.com&rlz=1C1CHBF_deDE1109DE1109&oq=nextjs+firebase+app+router+site%3Agithub.com&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCDkyMTZqMGo3qAIAsAIA&sourceid=chrome&ie=UTF-8)
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@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.
This is one example of firebase + nextjs app router + auth:
https://github.com/lucas-barake/nextjs-app-router-firebase-auth
You can find [more here](https://www.google.com/search?q=nextjs+firebase+app+router+site%3Agithub.com&rlz=1C1CHBF_deDE1109DE1109&oq=nextjs+firebase+app+router+site%3Agithub.com&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCDkyMTZqMGo3qAIAsAIA&sourceid=chrome&ie=UTF-8)
https://github.com/lucas-barake/nextjs-app-router-firebase-auth
You can find [more here](https://www.google.com/search?q=nextjs+firebase+app+router+site%3Agithub.com&rlz=1C1CHBF_deDE1109DE1109&oq=nextjs+firebase+app+router+site%3Agithub.com&gs_lcrp=EgZjaHJvbWUyBggAEEUYOdIBCDkyMTZqMGo3qAIAsAIA&sourceid=chrome&ie=UTF-8)
Answer