mg-arrow
mg-arrow
Hi Chris, Please find the OnAuthorizationCodeReceived below private Task OnAuthorizationCodeReceived(AuthorizationCodeReceivedNotification notification) { notification.TokenEndpointRequest.Parameters.TryGetValue("code_verifier", out var codeVerifier); if (codeVerifier != null) { // get access token for API calls var accessToken...
Chris, Thanks for your comment. I am confused, it seems like you are handling this same thing in the library here: ClaimsIdentity claimsIdentity = tokenEndpointUser.Identity as ClaimsIdentity; ticket = new...
Chris, I've tried doing that but OnSecurityTokenValidated is not firing. I have breakpoint there but it does not hit it at all. Your wrote: >put your code later in the...
I think after reading again I hope I understand your recommendations: You are saying I need to add code_verifier as parameter to TokenEndpointRequest in OnAuthorizationCodeReceived and get access token and...
Chris, I've just tried the following in OnAuthorizationCodeReceived method: notification.TokenEndpointRequest.SetParameter("code_verifier", codeVerifier); then calling: AuthenticationResult result = cca.AcquireTokenByAuthorizationCode(accessScopes, notification.Code).ExecuteAsync().Result; fails with invalid code verifier error. AADB2C90183: The supplied code_verifier is invalid...
Ok, here's the current status, removed RedeemCode line and removed the line to add code_verifier to TokenEndpointRequest . This line fails: AuthenticationResult result = cca.AcquireTokenByAuthorizationCode(accessScopes, notification.Code).ExecuteAsync().Result; with AADB2C90183: The supplied...
Can you please respond to my previous message ?
I have new update for you on the progress I was able to make. 1. I am able to receive the acess token in both cases - using custom code...
Looks like we are pretty close, thanks for your help