diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Applications/OpenIddictApplicationExtensions.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Applications/OpenIddictApplicationExtensions.cs index 87ef747f7bf..34ff4ba41f8 100644 --- a/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Applications/OpenIddictApplicationExtensions.cs +++ b/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Applications/OpenIddictApplicationExtensions.cs @@ -25,6 +25,7 @@ public static OpenIddictApplication ToEntity(this OpenIddictApplicationModel mod foreach (var extraProperty in model.ExtraProperties) { + entity.ExtraProperties.Remove(extraProperty.Key); entity.ExtraProperties.Add(extraProperty.Key, extraProperty.Value); } @@ -86,6 +87,7 @@ public static OpenIddictApplicationModel ToModel(this OpenIddictApplication enti foreach (var extraProperty in entity.ExtraProperties) { + model.ExtraProperties.Remove(extraProperty.Key); model.ExtraProperties.Add(extraProperty.Key, extraProperty.Value); } diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Authorizations/OpenIddictAuthorizationExtensions.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Authorizations/OpenIddictAuthorizationExtensions.cs index 28ad28a2064..80ef56539b8 100644 --- a/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Authorizations/OpenIddictAuthorizationExtensions.cs +++ b/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Authorizations/OpenIddictAuthorizationExtensions.cs @@ -19,6 +19,7 @@ public static OpenIddictAuthorization ToEntity(this OpenIddictAuthorizationModel foreach (var extraProperty in model.ExtraProperties) { + entity.ExtraProperties.Remove(extraProperty.Key); entity.ExtraProperties.Add(extraProperty.Key, extraProperty.Value); } @@ -68,6 +69,7 @@ public static OpenIddictAuthorizationModel ToModel(this OpenIddictAuthorization foreach (var extraProperty in entity.ExtraProperties) { + model.ExtraProperties.Remove(extraProperty.Key); model.ExtraProperties.Add(extraProperty.Key, extraProperty.Value); } diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Scopes/OpenIddictScopeExtensions.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Scopes/OpenIddictScopeExtensions.cs index b6870d9d67d..6734af2e1b2 100644 --- a/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Scopes/OpenIddictScopeExtensions.cs +++ b/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Scopes/OpenIddictScopeExtensions.cs @@ -19,6 +19,7 @@ public static OpenIddictScope ToEntity(this OpenIddictScopeModel model) foreach (var extraProperty in model.ExtraProperties) { + entity.ExtraProperties.Remove(extraProperty.Key); entity.ExtraProperties.Add(extraProperty.Key, extraProperty.Value); } @@ -69,6 +70,7 @@ public static OpenIddictScopeModel ToModel(this OpenIddictScope entity) foreach (var extraProperty in entity.ExtraProperties) { + model.ExtraProperties.Remove(extraProperty.Key); model.ExtraProperties.Add(extraProperty.Key, extraProperty.Value); } diff --git a/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Tokens/OpenIddictTokenExtensions.cs b/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Tokens/OpenIddictTokenExtensions.cs index 57991884834..10b290f2725 100644 --- a/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Tokens/OpenIddictTokenExtensions.cs +++ b/modules/openiddict/src/Volo.Abp.OpenIddict.Domain/Volo/Abp/OpenIddict/Tokens/OpenIddictTokenExtensions.cs @@ -24,6 +24,7 @@ public static OpenIddictToken ToEntity(this OpenIddictTokenModel model) foreach (var extraProperty in model.ExtraProperties) { + entity.ExtraProperties.Remove(extraProperty.Key); entity.ExtraProperties.Add(extraProperty.Key, extraProperty.Value); } @@ -81,6 +82,7 @@ public static OpenIddictTokenModel ToModel(this OpenIddictToken entity) foreach (var extraProperty in entity.ExtraProperties) { + model.ExtraProperties.Remove(extraProperty.Key); model.ExtraProperties.Add(extraProperty.Key, extraProperty.Value); }