```js export default async function token(req: NextApiRequest & Request, res: NextApiResponse & Resp...
e
Copy code
js
export default async function token(req: NextApiRequest & Request, res: NextApiResponse & Response) {

  // we first verify the session
  await superTokensNextWrapper(async next => verifySession()(req, res, next), req, res)
  const userId = req.session.getUserId()
anyone got a elegant way to get the session type ?
r
Hey. Instead of using req:NextApiRequest & Request. Use req: SessionRequest
e
Ah, where can I import it?
ah nvm got it!
Thanks 🙂
r
Cool