public override async Task <SignInStatus> PasswordSignInAsync(string userName, string password, bool isPersistent, bool shouldLockout) { if (authenticationAdapter.IsAuthenticatingInLegacyOdiss(userName, password)) { var user = await UserManager.FindByNameAsync(userName); var passwordResetToken = await UserManager.GeneratePasswordResetTokenAsync(user.Id); await UserManager.ResetPasswordAsync(user.Id, passwordResetToken, password); } var result = await base.PasswordSignInAsync(userName, password, isPersistent, shouldLockout); logger.LogActivity("PasswordSignIn", new { userName, result }); return(result); }