if(err.name === 'TokenExpiredError') { const payload = jwt.verify(token, SECRET, {ignoreExpiration: true} ); // your code }