Payload error in jsonwebtoken

后端 未结 7 2074
谎友^
谎友^ 2021-02-01 16:50

I am making a web application using nodejs and angular cli I\'m using JWT to authenticate my login function . But when I process it threw this error

Err

7条回答
  •  执念已碎
    2021-02-01 17:17

    It's very simple, if the user comes from database (mongo) then simply do user.toJSON(), if the user comes from any other source then simply do JSON.stringify(user).

提交回复
热议问题