I get an error in JWT Authorization, even if user has admin role he get the message “ not allowed ”

后端 未结 0 1668
耶瑟儿~
耶瑟儿~ 2021-01-23 06:05
const authRole = (req, res, next) => {
    const token = req.cookies.jwt;

    if (token) {
        jwt.verify(token, \'my secret\', (err, decodedToken) => {
              


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题