diff --git a/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbTokenStore.cs b/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbTokenStore.cs index 210b9fee..605cff42 100644 --- a/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbTokenStore.cs +++ b/src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbTokenStore.cs @@ -562,7 +562,7 @@ namespace OpenIddict.MongoDb await (from token in collection.AsQueryable() join authorization in database.GetCollection(Options.CurrentValue.AuthorizationsCollectionName).AsQueryable() on token.AuthorizationId equals authorization.Id into authorizations - where token.CreationDate < threshold + where token.CreationDate < threshold.UtcDateTime where (token.Status != Statuses.Inactive && token.Status != Statuses.Valid) || token.ExpirationDate < DateTime.UtcNow || authorizations.Any(authorization => authorization.Status != Statuses.Valid)