private async Task <EmailResponse> ForgotMainPassword(IdentityUser user) { var code = await _userManager.GeneratePasswordResetTokenAsync(user); var callbackUrl = Url.ResetPasswordCallbackLink(user.Id, HttpUtility.UrlEncode(code), Request.Scheme); return(await _emailServices.SendEmailResetPasswordAsync(user.Email, callbackUrl)); }
private async Task <EmailResponse> ForgotMainPassword(IdentityUser user) { // gerar JWT para reset de senha var code = await _userManager.GeneratePasswordResetTokenAsync(user); // criar link para retorno var callbackUrl = Url.ResetPasswordCallbackLink(user.Id, HttpUtility.UrlEncode(code), Request.Scheme); // método de extensão de URL return(await _emailServices.SendEmailResetPasswordAsync(user.UserName, callbackUrl)); }