1
var jwtToken = new JwtSecurityToken(issuer: "Blinkingcaret",
                audience: "Anyone",
                claims: claims,
                notBefore: DateTime.Now,
                expires: DateTime.Now.AddSeconds(int.Parse(_configuration["accessTokenDurationInSeconds"])),
                signingCredentials: new SigningCredentials(key, SecurityAlgorithms.HmacSha256)
            );

"accessTokenDurationInSeconds": 10,

When I debug the app, I am seeing the Expiration time to occur in 4 hours from now. Not 10 seconds!

What am I doing wrong?

software is fun
  • 7,286
  • 18
  • 71
  • 129
  • Does this answer your question? [JwtSecurityToken doesn't expire when it should](https://stackoverflow.com/questions/39728519/jwtsecuritytoken-doesnt-expire-when-it-should) – TDiblik Aug 18 '21 at 10:32

0 Answers0