public IActionResult SignIn() { var properties = SignInManager.ConfigureExternalAuthenticationProperties("Microsoft", "/"); properties.RedirectUri = "/api/account/oauth/test"; return(Challenge(properties, "Microsoft")); }
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)); }
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)); }