public async Task <ActionResult> SendCode(SendCodeViewModel model) { if (!ModelState.IsValid) { return(View()); } // Generate the token and send it if (!await SignInManager.SendTwoFactorCodeAsync(model.SelectedProvider)) { return(View("Error")); } return(RedirectToAction("VerifyCode", new { Provider = model.SelectedProvider, ReturnUrl = model.ReturnUrl, RememberMe = model.RememberMe })); }
public async Task <ActionResult> SendCode(SendCodeViewModel model) { if (!ModelState.IsValid) { return(View()); } // Generates and sends the token if (!await signInManager.SendTwoFactorCodeAsync(model.SelectedProvider)) { return(View("Error")); } return(RedirectToAction(nameof(VerifyCode), new { Provider = model.SelectedProvider, ReturnUrl = model.ReturnUrl, userId = model.UserId })); }
public async Task <ActionResult> SendCode(SendCodeViewModel model) { if (!ModelState.IsValid) { return(View()); } // Generate the token and send it if (!await SignInManager.SendTwoFactorCodeAsync(model.SelectedProvider)) { DemLogger.Current.Error($"{nameof(AdministrationController)}. POST Action SendCode: SignInManager.SendTwoFactorCodeAsync(model.SelectedProvider) return false"); return(View("Error")); } return(RedirectToAction("VerifyCode", new { Provider = model.SelectedProvider, ReturnUrl = model.ReturnUrl, RememberMe = model.RememberMe })); }
public async Task <bool> SendTwoFactorCodeAsync(string provider) { return(await ApplicationSignInManager.SendTwoFactorCodeAsync(provider)); }
public async Task <bool> SendCode(string selectedProvider) { return(await _signInManager.SendTwoFactorCodeAsync(selectedProvider)); }
public async Task <bool> SendTwoFactorCodeAsync(ApplicationSignInManager signInManager, string selectedProvider) { var result = await signInManager.SendTwoFactorCodeAsync(selectedProvider); return(result); }
public async Task <bool> EnviarToken(string provedor) { return(await _signInManager.SendTwoFactorCodeAsync(provedor)); }