You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IdentityOptions.Value.Password.ClearRequirements() only the default password verification rules will be ignored, and the custom IPasswordValidator can't be ignored.
publicclassMyPasswordValidator:IPasswordValidator<IdentityUser>{publicTask<IdentityResult>ValidateAsync(UserManager<IdentityUser>manager,IdentityUseruser,stringpassword){if(password== user.UserName ||password== user.Email){return Task.FromResult(IdentityResult.Failed(new IdentityError
{Description="The password cannot be the same as the username or email."}));}return Task.FromResult(IdentityResult.Success);}}
Create user without validate password. validatePassword: false
IdentityOptions.Value.Password.ClearRequirements()
only the default password verification rules will be ignored, and the customIPasswordValidator
can't be ignored.Create user without validate password. validatePassword: false
The text was updated successfully, but these errors were encountered: