0
hra created
Prerequisites
AspNetZero 10
We are using Microsoft Authentication, and have noticed that after a user has provisioned their account using "Sign in with Microsoft", their name appears as: "John Smith Smith" - because their first and last names are squeezed into the AbpUser.FirstName in addition to their last name being placed in Abpuser.Surname.
After recently being given a code sample, we can now see why: in MicrosoftAuthProviderApi
is the following code:
var result = new ExternalAuthUserInfo
{
Name = MicrosoftAccountHelper.GetDisplayName(payload),
EmailAddress = MicrosoftAccountHelper.GetEmail(payload),
Surname = MicrosoftAccountHelper.GetSurname(payload),
Provider = Name,
ProviderKey = MicrosoftAccountHelper.GetId(payload)
};
I believe It should be
var result = new ExternalAuthUserInfo
{
Name = MicrosoftAccountHelper.GetGivenName(payload),
EmailAddress = MicrosoftAccountHelper.GetEmail(payload),
Surname = MicrosoftAccountHelper.GetSurname(payload),
Provider = Name,
ProviderKey = MicrosoftAccountHelper.GetId(payload)
};
2 Answer(s)
-
0
Hi @hra
Thanks, we will also fix this with https://github.com/aspnetzero/aspnet-zero-core/issues/4064
-
0
closed by https://github.com/aspnetzero/aspnet-zero-core/issues/4104