· 6 years ago · Jan 22, 2019, 02:04 AM
1[HttpPost]
2[AllowAnonymous]
3[ValidateAntiForgeryToken]
4public IActionResult ExternalLogin(string provider, string returnUrl = null)
5{
6 // Request a redirect to the external login provider.
7 var redirectUrl = Url.Action(nameof(ExternalLoginCallback), "Account", new { returnUrl });
8 var properties = _signInManager.ConfigureExternalAuthenticationProperties(provider, redirectUrl);
9 return Challenge(properties, provider);
10}
11
12POST /oauth/token HTTP/1.1
13Host: authorization-server.com
14
15grant_type=authorization_code
16&code=xxxxxxxxxxx
17&redirect_uri=https://example-app.com/redirect
18&client_id=xxxxxxxxxx
19&client_secret=xxxxxxxxxx