public async Task <ActionResult> SendCode(string returnUrl, bool rememberMe) { var userId = await SignInManageService.GetVerifiedUserIdAsync(); if (userId == null) { return(View("Error")); } var userFactors = await UserManageService.GetValidTwoFactorProvidersAsync(userId); var factorOptions = userFactors.Select(purpose => new SelectListItem { Text = purpose, Value = purpose }).ToList(); return(View(new SendCodeViewModel { Providers = factorOptions, ReturnUrl = returnUrl, RememberMe = rememberMe })); }