[HttpGet] | |
public async Task<IActionResult> Callback([FromQuery]string code) | |
{ | |
var authClient = new AuthenticationApiClient("<domain>.auth0.com"); | |
var tokenResponse = await authClient.GetTokenAsync(new AuthorizationCodeTokenRequest | |
{ | |
RedirectUri = "https://localhost:5001/home/auth_callbabck", | |
Code = code, | |
ClientId = "<your client id>", | |
ClientSecret = "<your client secret>" | |
}); | |
CustomContext.IdToken = tokenResponse.IdToken; | |
CustomContext.AccessToken = tokenResponse.AccessToken; | |
CustomContext.RefreshToken = tokenResponse.RefreshToken; | |
return Redirect("CodeView"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment