If you're creating a bug/problem report, please include followings:
AllowedUserNameCharacters
thanks for the help i use AllowedUserNameCharacters to solve the error. thank you.
public override async Task<Volo.Abp.Identity.IdentityUser> CreateUserAsync(string userName, string providerName)
{
await IdentityOptions.SetAsync();
var externalUser = await GetUserInfoAsync(userName);
NormalizeExternalLoginUserInfo(externalUser, userName);
var user = new Volo.Abp.Identity.IdentityUser(
GuidGenerator.Create(),
userName,
externalUser.Email,
tenantId: CurrentTenant.Id
);
user.Name = externalUser.Name;
user.Surname = externalUser.Surname;
user.IsExternal = true;
user.SetEmailConfirmed(externalUser.EmailConfirmed ?? false);
user.SetPhoneNumber(externalUser.PhoneNumber, externalUser.PhoneNumberConfirmed ?? false);
(await UserManager.CreateAsync(user)).CheckErrors();
if (externalUser.TwoFactorEnabled != null)
{
(await UserManager.SetTwoFactorEnabledAsync(user, externalUser.TwoFactorEnabled.Value)).CheckErrors();
}
(await UserManager.AddDefaultRolesAsync(user)).CheckErrors();
(await UserManager.AddLoginAsync(
user,
new UserLoginInfo(
providerName,
externalUser.ProviderKey,
providerName
)
)
).CheckErrors();
return user;
}
but in "cn" attribue have space how i can remove.
Can you share more details?
if i removed space from username then following error occured
Did you add any custom code?
which type of details you need?
Yes,i added the code for CreateUserAsync.