Next.js Discord

Discord Forum

firebase auth.currentUser undefined in middleware

Unanswered
Danna posted this in #help-forum
Open in Discord
Avatar
DannaOP
Hi - so I'm currently logging in my user via google with firebase.
In my useclient files I can simply console log the current user

Now if I check try this
  console.log(auth.currentUser?.displayName);


In my middleware I just get undefined.

Is there a way to deal with this?

1 Reply

Avatar
DannaOP
just did some googling and stumpled upon nextauth.js ... am I forced to use that perhaps?