DEV Community

Discussion on: Remix Blog Tutorial - Firebase Auth, Remix, React, MongoDB Storage, Prisma, Vercel (Part 2)

Collapse
 
lucianolivares profile image
Luciano Olivares López

Hi, nice content ! I want give you a feedback, I'm not expert anyway maybe im wrong.
I have seen your code, and I think there is a error when you use authentication. You are using the firebase app in server, and when you call currentUser you will call the currentUser on the server, if someone else login in another browser the site will change that value and then first user in this case will call the data of the second user. To do server side authentication you need use firebase-admin sdk.