79232647

Date: 2024-11-28 05:15:36
Score: 1
Natty:
Report link

According to the documentation of next-auth/react.

getSession is client side method, you are accessing the getSession at the layout file which is not a client side component, hence it is returning null.

In your use-case, you should use getServerSession.

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: nikitimi