Google oauth redirect error with mongodb

So, i get this redirect error
http://localhost:3000/api/auth/callback/google?state=J6hVyRrG9iE1Es9TipKx5sPBuT0Du3MM&code=4%2F0AanRRruFbElWFwdL4P4pFcW6PqAA0izo3Vdh8Pb6bTdvYLHkwT33Borjso_6Cfg0irvBlA&scope=email+profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+openid&authuser=0&prompt=none
and the error message in the console

GET /api/auth/get-session?currentURL=http%3A%2F%2Flocalhost%3A3000%2Fsignin 200 in 22ms
2024-12-25T11:43:04.990Z ERROR [Better Auth]: TypeError [TypeError: The "payload" argument must be of type object. Received null] {
  code: 'ERR_INVALID_ARG_TYPE'
}
 GET /api/auth/callback/google?state=J6hVyRrG9iE1Es9TipKx5sPBuT0Du3MM&code=4%2F0AanRRruFbElWFwdL4P4pFcW6PqAA0izo3Vdh8Pb6bTdvYLHkwT33Borjso_6Cfg0irvBlA&scope=email+profile+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile+openid&authuser=0&prompt=none 500 in 876ms

Pls help
Thx in advance
Was this page helpful?