JWT at 29:00 (in the video) works for login, but not for register
Ramzy70 opened this issue · comments
{
"message": "Cannot access 'user' before initialization",
"stack": "ReferenceError: Cannot access 'user' before initialization\n at D:\z_Dev\MERN\mern-tuto\backend\controllers\userController.js:36:31"
}
for the login the token gets returned normally, but not for register