NextJS getSession() is returning null

I’m also seeing this and I have the withApiAuthRequired

export default withApiAuthRequired(async function (req: any, res: any) {
  const { method } = req;

  const session = getSession(req, res);
  const user = session?.user;
  console.log(session.user)
...
  }
});