AngularASPNETCore2WebApiAuth
AngularASPNETCore2WebApiAuth copied to clipboard
SecurityTokenExpiredException when the server runs for a few hours
When the server runs for a while it stops handing out valid JWT tokens. They all have the same expiration date. The reason for this is the fact that JwtFactory is Singleton and injects IOptions<JwtIssuerOptions>. JwtIssuerOptions.IssuedAt is set to DateTime.UtcNow at program start and never reevaluated.