You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 30, 2022. It is now read-only.
UnhandledPromiseRejectionWarning: Error: Expected "payload" to be a plain object.
...
02/exercises/udacity-c2-restapi/src/controllers/v0/users/routes/auth.router.ts:31:16)
function generateJWT(user: User): string {
//@TODO Use jwt to create a new JWT Payload containing
return jwt.sign(user.toJSON(), config.jwt.secret); //toJSON is required
}
https://stackoverflow.com/questions/47117709/payload-error-in-jsonwebtoken
This was required after
npm audit fix
for the rest backend. I don't know about the original code. Please advise if I can send a PL please, thanks, G.The text was updated successfully, but these errors were encountered: