Skip to content

Expose private UpdatePasswordHash with IUserPasswordStore overload to derived classes #12344

Open
@slaneyrw

Description

@slaneyrw

Is your feature request related to a problem? Please describe.

Content...

  • I have a derived class of UserManager.
  • I have an alternative implementation of PasswordHasher that requires an Async call ( Argon2 ).
  • I also have additional processes I need to perform between when a password is hashed and the user is updated.

Unfortunately the placed where both of these processes are performed is in the private overload of UpdatePasswordHash that has the IUserPasswordStore parameter.

To resolve my issue I have to replace all 6 methods that hash passwords that, with the exception of UpdatePasswordHash, are identical to the implementation in the UserManager.

  • AddPasswordAsync
  • ChangePasswordAsync
  • CheckPasswordAsync (ReHash flow)
  • CreatePasswordAsync
  • RemovePasswordAsync

The original hashing method also calls another private method UpdateSecurityStampInternal that I need to also call.

Incidently GenerateNewAuthenticatorKey is virtual, but UpdateSecurityStampInternal directly uses the it's default target of NewSecurityStamp. What's the point of making it virtual if UpdateSecurityStampInternal doesn't use it.

Describe the solution you'd like

Make the private UpdatePasswordHash with IUserPasswordStore overload protected
Make the private UpdateSecurityStampInternal method protected

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    affected-fewThis issue impacts only small number of customersarea-identityIncludes: Identity and providersenhancementThis issue represents an ask for new feature or an enhancement to an existing oneseverity-minorThis label is used by an internal tooltriaged

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions