jwt.verify not throwing error for expired tokens
问题 I'm using JWT - jsonwebtokens in Nodejs. I'm creating a token and want to throw an error if the token expires. My token is created successfully and I'm checking the token expiry in middleware of Apis in Expressjs. Then token is sent from Angular in headers and the expiration is checked in middleware. This is how I'm creating the token: var token = jwt.sign({ id: id, expiresIn: '2m' }, 'mysecretkey' ); This is how my middlware looks like: var token = req.headers['authorization'] var idToken =