fix: disable clock skew

reference:
https://stackoverflow.com/a/46231102
https://stackoverflow.com/a/47155318
This commit is contained in:
2025-07-22 11:00:10 +02:00
parent 0ec7bdf2fe
commit 468d502827

View File

@@ -54,7 +54,11 @@ builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
ValidAudience = DomainName, ValidAudience = DomainName,
IssuerSigningKey = new SymmetricSecurityKey( IssuerSigningKey = new SymmetricSecurityKey(
Encoding.UTF8.GetBytes(JwtSecret) Encoding.UTF8.GetBytes(JwtSecret)
) ),
// disable clock skew
// https://stackoverflow.com/a/46231102
// https://stackoverflow.com/a/47155318
ClockSkew = TimeSpan.Zero
}; };
}); });