diff --git a/Extensions/XModelExtensions.cs b/Extensions/XModelExtensions.cs index 8fb329a..8b18355 100644 --- a/Extensions/XModelExtensions.cs +++ b/Extensions/XModelExtensions.cs @@ -522,7 +522,6 @@ namespace xIdentityModels.Extensions result.Add(new(ClaimTypes.Name, source.OwnerId)); result.Add(new(XCustomClaims.UserId, source.OwnerId)); result.Add(new(JwtClaimTypes.Subject, source.OwnerId)); - result.Add(new(XCustomClaims.Picture, source.Owner.Avatar)); result.Add(new(XCustomClaims.UserName, source.Owner.Username)); result.Add(new(XCustomClaims.LastName, source.Owner.Lastname)); result.Add(new(XCustomClaims.AuthType, XAuthorization.XApiKey)); @@ -538,6 +537,12 @@ namespace xIdentityModels.Extensions result.Add(new(JwtClaimTypes.Scope, scope)); } } + + // + if (!source.Owner.Avatar.IsNullOrEmpty()) + { + result.Add(new(XCustomClaims.Picture, source.Owner.Avatar)); + } } //