DEV Community

Austin Layman
Austin Layman

Posted on

Test

 if(token){
        jwt.verify(token, config.secret, (err, payload) => {
            if(err){console.log(err.message)
            res.redirect('/user/login')}
            else{
                console.log(payload)
                next()
            }
        })
    }else{

        res.redirect('/user/login')}
    }
Enter fullscreen mode Exit fullscreen mode

Top comments (0)