IdentityModel.OidcClient
IdentityModel.OidcClient copied to clipboard
OidcClient throwing Unauthorized error after upgrade from 3.1.2 to 5.0.2
Hi,
In my application, we are using OidcClient to connect with Google account. It was working fine with version 3.1.2. After upgrading to 5.0.2, ResponseMode and Flow is no more available so commented it but now its giving response "Error contacting userinfo endpoint: Unauthorized" .
Code for Auth configuration :
OidcClientOptions oidcClientOptions = new OidcClientOptions
{
Authority = GoogleFitConfiguration.AuthorizeUrl,
ClientId = GoogleFitConfig.AndroidClientId,
Scope = GoogleFitConfiguration.ActivityScope,
RedirectUri = GoogleFitConfig.AndroidRedirectUrl,
Browser = IoCRegistry.Locate<IBrowser>(),
//Flow = OidcClientOptions.AuthenticationFlow.Hybrid,
//ResponseMode = OidcClientOptions.AuthorizeResponseMode.Redirect,
Policy = new Policy
{
Discovery = discovery,
RequireAccessTokenHash = false
}
};
Using above params , OidcClient object(say "oidcClientObj") is created and then loginRequest is executed using await oidcClientObj.LoginAsync(new LoginRequest()) -> this opens the google login page -> user enters credentials -> "Allow" permission -> getting UnAuthrorized error response.
Note - Using this in Xamarin application. Can you please let me know what has changed between 3.1.2 to 5.0.2 and what new changes needs to be done in order to handle this error
did you check your server error logs?
Same here:
did you check your server error logs?