jwt.verify(token, process.env.SECRET, function(err, decoded) {
if (err) {
res.status(401).send({
message: 'Unable to verify email. Probably, your token is expired.'
})
return
}
console.log(decoded)
})
var decodedOuter
jwt.verify(token, process.env.SECRET, function(err, decoded) {
decodedOuter = decoded
if (err) {
res.status(401).send({
message: 'Unable to verify email. Probably, your token is expired.'
})
return
}
})