Security.Jwt icon indicating copy to clipboard operation
Security.Jwt copied to clipboard

if the .key file has ExpiredAt and expired, it will always generate new .key file

Open liugt34 opened this issue 1 year ago • 0 comments

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");
}

liugt34 avatar Mar 11 '24 09:03 liugt34