Next 13 + NextAuth - Redirect on the server
So... I was wondering if anyone has this figured out.
I want a protected dashboard page that gets the session and redirects if not authed. Buttt... I wanted this on a server component. Instead of rendering the page then redirecting if session is null.
with this I get the following error lmao
And yes, I wish I could solve this without "use client";
3 Replies
Trying to follow NextAuth documentation:
error:
found a workaround: https://github.com/vercel/next.js/issues/46493
GitHub
Route Handlers Crash with bcrypt · Issue #46493 · vercel/next.js
Verify canary release I verified that the issue exists in the latest Next.js canary release Provide environment information Operating System: Platform: linux Arch: x64 Version: Ubuntu 20.04.0 LTS M...