public IActionResult SignIn()
        {
            var properties = SignInManager.ConfigureExternalAuthenticationProperties("Microsoft", "/");

            properties.RedirectUri = "/api/account/oauth/test";
            return(Challenge(properties, "Microsoft"));
        }
Beispiel #2
0
        public IActionResult ExternalLogin(string provider, string returnUrl = null)
        {
            // Request a redirect to the external login provider.
            var redirectUrl = Url.Action("ExternalLoginCallback", "Account", new { ReturnUrl = returnUrl });
            var properties  = _signInManager.ConfigureExternalAuthenticationProperties(provider, redirectUrl);

            return(new ChallengeResult(provider, properties));
        }
Beispiel #3
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  = _signInManager.ConfigureExternalAuthenticationProperties(provider, redirectUrl);

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