For NextJS framework the method name unstable_getServerSession was renamed to getServerSession
. You can see the documentation on the following page.
Next.js | NextAuth.js (next-auth.js.org)
The code that generated the error for me was:
if (!session?.user.id) return res.status(401).end("Unauthorized");
And the error messages were:
unstable_getServerSession deprecated symbol used
Type error: Property 'user' does not exist on type '{}'.
Comments
Post a Comment