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 '{}'.
Mobile Web Specialist (Grow with Google Graduate), RPA UiPath, PowerBI/Power Apps and Software/Product Researcher