public IActionResult ExternalLogin(string provider, string returnUrl = null) { string redirectUrl; // Request a redirect to the external login provider. redirectUrl = $"Account/{nameof(ExternalLoginCallback)}/";//Url.Action(nameof(ExternalLoginCallback), "Account", new { returnUrl }); AuthenticationProperties properties = _authentication.ConfigureExternalAuthenticationProperties(provider, redirectUrl); return(Challenge(properties, provider)); }