Beispiel #1
0
        public IActionResult LinkLogin(string provider)
        {
            // Request a redirect to the external login provider to link a login for the current user
            var redirectUrl = Url.Action("LinkLoginCallback", "Manage");
            var properties  = signInManager.ConfigureExternalAuthenticationProperties(provider, redirectUrl, User.GetUserId());

            return(new ChallengeResult(provider, properties));
        }
        public IActionResult ExternalLogin(string provider, string returnUrl = null)
        {
            log.LogDebug("ExternalLogin called for " + provider +" with returnurl " + returnUrl);

            // 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 AuthenticationProperties ConfigureExternalAuthenticationProperties(string provider, string returnUrl = null)
 {
     return(signInManager.ConfigureExternalAuthenticationProperties(provider, returnUrl));
 }