Provider type
Credentials
Environment
System:
OS: macOS 13.3.1
CPU: (4) x64 Intel(R) Core(TM) i5-7267U CPU @ 3.10GHz
Memory: 261.21 MB / 8.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.15.0 - /usr/local/bin/node
Yarn: 1.22.19 - ~/.yarn/bin/yarn
npm: 9.6.2 - /usr/local/bin/npm
Browsers:
Chrome: 114.0.5735.90
Firefox: 112.0.2
Safari: 16.4
Reproduction URL
local development
Describe the issue
I am using next 13.4.0 app dir with nextauth 4.22.1 for my authentication but I got the error [next-auth]: useSession must be wrapped in a pages folder move to inside src folder on my console

There was some suggestions here #3061 it works permanently, the error still there when i start my project when i use: yarn dev
How to reproduce
So this is my config with next auth Credentials

Provider

authOptions

I think there are something wrong with the layout.tsx file

I use the useSession in my login page

Expected behavior
How can I fix the error, many thanks!!