Next.js Discord

Discord Forum

Get session details in Middleware.js

Unanswered
Sloughi posted this in #help-forum
Open in Discord
SloughiOP
How to get session values in middleware.js. I have the credentials provider set up in my project which is the firebase email and password and I want to to check the user authenticated status in middleware.js. How to do it?

If user is authenticated, it should be redirected to '/'.

0 Replies