コード例 #1
0
        public async Task <IActionResult> OnGetAsync(string returnUrl)
        {
            await _applicationUserManager.CheckSeed();

            // build a model so we know what to show on the login page
            loginViewModel = await BuildLoginViewModelAsync(returnUrl);

            if (loginViewModel.IsExternalLoginOnly)
            {
                // we only have one option for logging in and it's an external provider
                return(RedirectToAction("Challenge", "External", new { provider = loginViewModel.ExternalLoginScheme, returnUrl }));
            }

            return(Page());
        }