Middleware redirect
I am currently having issues redirecting users to the login screen. User story: a user is not logged in and they click the 'dashboard' button, the button should redirect them to the nextauth login screen.
5 Replies
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
appreciate it
wait idk if im dumb
but if its clientside
how do I (!session)
if we cant get session
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
there's a
withAuth
wrapper to redirect out users to the login page https://next-auth.js.org/configuration/nextjs#advanced-usageNext.js | NextAuth.js
unstable_getServerSession