From 468d502827dab4840fe489b992e43ba96c0e98cc Mon Sep 17 00:00:00 2001 From: eee4 <41441600+eee4@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:00:10 +0200 Subject: [PATCH] fix: disable clock skew reference: https://stackoverflow.com/a/46231102 https://stackoverflow.com/a/47155318 --- Program.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Program.cs b/Program.cs index 7443060..f7a0092 100644 --- a/Program.cs +++ b/Program.cs @@ -54,7 +54,11 @@ builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) ValidAudience = DomainName, IssuerSigningKey = new SymmetricSecurityKey( Encoding.UTF8.GetBytes(JwtSecret) - ) + ), + // disable clock skew + // https://stackoverflow.com/a/46231102 + // https://stackoverflow.com/a/47155318 + ClockSkew = TimeSpan.Zero }; });