diff --git a/src/oidc-guard/Program.cs b/src/oidc-guard/Program.cs index ce0b566..a0a5ac1 100644 --- a/src/oidc-guard/Program.cs +++ b/src/oidc-guard/Program.cs @@ -55,10 +55,12 @@ public static void Main(string[] args) o.NonceCookie.Name = settings.CookieName; o.ResponseType = OpenIdConnectResponseType.Code; o.SaveTokens = settings.SaveTokensInCookie; + o.TokenValidationParameters.ClockSkew = TimeSpan.FromSeconds(30); }) .AddJwtBearer(o => { o.MetadataAddress = settings.OpenIdProviderConfigurationUrl; + o.TokenValidationParameters.ClockSkew = TimeSpan.FromSeconds(30); o.TokenValidationParameters.ValidateAudience = settings.ValidateAudience; o.TokenValidationParameters.ValidateIssuer = settings.ValidateIssuer; o.TokenValidationParameters.ValidIssuers = settings.ValidIssuers;