using next js / react and auth0/nextjs-auth0
const session = getSession(req, res);
const sid: string = session?.user.sub
if (!session) { res.status(401).json({ message: "You must be logged in." }); return; } if (req.method === 'GET') { const user: dbuser | undefined = await getUser(sid); const name: string = session?.user.name ?? '' const firstname = session?.user.given_name const lastname = session?.user.family_name
from version 1.9.2 this breaks as user is not available.
how do i now get these user properties server and through next.js
Thanks