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 }); }
private ActionResult RedirectToVerifyCode(SendCodeViewModel model) { return RedirectToAction(ActionNames.VerifyCode, new { Provider = model.SelectedProvider, model.ReturnUrl, model.RememberMe }); }
public async Task<ActionResult> SendCode(SendCodeViewModel model) { if (!ModelState.IsValid) { return SendCodeView(); } // トークンを生成して送信します。 if (!await SignInManager.SendTwoFactorCodeAsync(model.SelectedProvider)) { return ErrorView(); } return RedirectToVerifyCode(model); }
private ActionResult SendCodeView(SendCodeViewModel model) { return View(ViewNames.SendCode, model); }