Skip to content

Commit

Permalink
fix: Allow for 2 seconds clock skew in token validation (#536)
Browse files Browse the repository at this point in the history
Due to slightly mismatched clocks, tokens from the tokengenerator (or
other sources) might create tokens that are not yet valid (when
validation `iat` claim) in Dialogporten. We can alleviate this by
allowing for 2 seconds of skew.
  • Loading branch information
elsand authored Mar 12, 2024
1 parent 67885af commit a0147b8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public static IServiceCollection AddDialogportenAuthentication(
ValidateAudience = false,
RequireExpirationTime = true,
ValidateLifetime = true,
ClockSkew = TimeSpan.Zero
ClockSkew = TimeSpan.FromSeconds(2)
};

options.Events = new JwtBearerEvents
Expand Down

0 comments on commit a0147b8

Please sign in to comment.