Exemple #1
0
        public IActionResult OnPost(string provider, string returnUrl = null)
        {
            // Request a redirect to the external login provider.
            var redirectUrl = Url.Page("./ExternalLogin", pageHandler: "Callback", values: new { returnUrl });
            var properties  = _externalLoginService.CreateAuthenticationProperties(provider, redirectUrl);

            return(new ChallengeResult(provider, new AuthenticationProperties(properties)));
        }