diff --git a/src/IdentityServer/Extensions/HttpContextExtensions.cs b/src/IdentityServer/Extensions/HttpContextExtensions.cs index ae104bc63..175113dd7 100644 --- a/src/IdentityServer/Extensions/HttpContextExtensions.cs +++ b/src/IdentityServer/Extensions/HttpContextExtensions.cs @@ -40,13 +40,12 @@ internal static async Task GetIdentityServerSignoutFrameCallbackUrlAsync // if we have a logout message, then that take precedence over the current user if (logoutMessage?.ClientIds?.Any() == true) { - var clientIds = logoutMessage?.ClientIds; + var clientIds = logoutMessage.ClientIds; // check if current user is same, since we might have new clients (albeit unlikely) - if (currentSubId == logoutMessage?.SubjectId) + if (currentSubId == logoutMessage.SubjectId) { clientIds = clientIds.Union(await userSession.GetClientListAsync()); - clientIds = clientIds.Distinct(); } endSessionMsg = new LogoutNotificationContext diff --git a/src/IdentityServer/Services/Default/DefaultPersistedGrantService.cs b/src/IdentityServer/Services/Default/DefaultPersistedGrantService.cs index ea053cd9d..33c3090a0 100644 --- a/src/IdentityServer/Services/Default/DefaultPersistedGrantService.cs +++ b/src/IdentityServer/Services/Default/DefaultPersistedGrantService.cs @@ -144,7 +144,7 @@ private IEnumerable Join(IEnumerable first, IEnumerable sec var match = list.FirstOrDefault(x => x.ClientId == other.ClientId); if (match != null) { - match.Scopes = match.Scopes.Union(other.Scopes).Distinct(); + match.Scopes = match.Scopes.Union(other.Scopes); if (match.CreationTime > other.CreationTime) {