예제 #1
0
        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 });
        }
예제 #2
0
 private ActionResult RedirectToVerifyCode(SendCodeViewModel model)
 {
     return RedirectToAction(ActionNames.VerifyCode,
         new { Provider = model.SelectedProvider, model.ReturnUrl, model.RememberMe });
 }
예제 #3
0
        public async Task<ActionResult> SendCode(SendCodeViewModel model)
        {
            if (!ModelState.IsValid)
            {
                return SendCodeView();
            }

            // トークンを生成して送信します。
            if (!await SignInManager.SendTwoFactorCodeAsync(model.SelectedProvider))
            {
                return ErrorView();
            }
            return RedirectToVerifyCode(model);
        }
예제 #4
0
 private ActionResult SendCodeView(SendCodeViewModel model)
 {
     return View(ViewNames.SendCode, model);
 }