NextAuth middleware

I don't know why when I'm using NextAuth middleware and I successfully log In (I can see session when I disable middleware and use useSession hook on index page) it still redirects me to login page 😕
7 Replies
rocawear
rocawear•2y ago
And your middleware looks like?
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Patryk Makowski
Patryk MakowskiOP•2y ago
Oh thanks, do you know why we use database instead of JWT?
Unknown User
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Patryk Makowski
Patryk MakowskiOP•2y ago
So If I want to stick with session based auth how can I have protected routes?
tyler4949
tyler4949•15mo ago
So does this mean we have to deviate from the t3 tutorial on Theo's YouTube if we want to use NextAuth instead of Clerk? You're a life saver. Thank you for this!
Want results from more Discord servers?
Add your server