Security.Jwt
Security.Jwt copied to clipboard
if the .key file has ExpiredAt and expired, it will always generate new .key file
in FileSystemStore.cs this code always return the first file, so it will generate new file repeatly.
private string GetCurrentFile()
{
var files = Directory.GetFiles(KeysPath.FullName, $"*current*.key");
if (files.Any())
return Path.Combine(KeysPath.FullName, files.First());
return Path.Combine(KeysPath.FullName, $"{_options.Value.KeyPrefix}current.key");
}