Hi! After upgrading to 4.2.2 from 3.3.1 our "change password" function that we call from our custom built front-end does not work anymore. I suspect it has to do with the changes described in the migration guide here: https://docs.abp.io/en/abp/latest/Migration-Guides/Abp-4_0#identityoptions-usage since it seems like the password related settings we've set in ABP settings are not being used.
We are simply calling
var result = await _userManager.ChangePasswordAsync(user, currentPassword, newPassword);
and the userManager injected is Microsoft.AspNetCore.Identity.UserManager<Volo.Abp.Identity.IdentityUser>
.
Now, we've got it to work by injecting IOptions<IdentityOptions> and calling the SetAsync method as described:
await _options.SetAsync();
var result = await _userManager.ChangePasswordAsync(user, currentPassword, newPassword);
Is this correct usage or is there a better way?
- ABP Framework version: v4.2.2
- UI type: MVC
- DB provider: EF Core
- Tiered (MVC) or Identity Server Separated (Angular): no
- Exception message and stack trace:
- Steps to reproduce the issue:
2 Answer(s)
-
0
hi
You are right, calling the SetAsync method is the right way.
-
0
You are right, calling the SetAsync method is the right way.
Thank you!