public async Task StartResetPasswordFlow(StartResetPasswordFlowDto startResetPasswordFlowDto) { var user = await _userManager.GetByAsync(x => x.Email == startResetPasswordFlowDto.Email); if (user == null) { return; } var hash = RandomHashGenerator.RandomHash; if (user.HasLocalAccount()) { await SaveUserResetPasswordData(user, hash); } _emailService.SendResetPasswordEmail(user.Email, user.HasLocalAccount(), hash); }
public async Task <IActionResult> StartResetPasswordFlow([FromBody] StartResetPasswordFlowDto startResetPasswordFlowDto) { await _passwordResetService.StartResetPasswordFlow(startResetPasswordFlowDto); return(NoContent()); }