Open lszl84 opened 4 months ago
It seems that using older version of the mentioned package fixes the problem (5.2.1 instead of 6.0.0 which is installed by default):
<PackageReference Include="IdentityModel.OidcClient.IdentityTokenValidator" Version="5.2.1" />
Hello @lszl84 I have faced this issue today I have added the
**<PackageReference Include="IdentityModel.OidcClient.IdentityTokenValidator" Version="5.2.1" />**
and
**<PackageReference Include="Auth0.OidcClient.MAUI" Version="1.0.1" />**
when I added the latest version of the TokenValidator nuget the login web page didn't display to the user.
Only when I used this version the the web page is displayed otherwise when I call LoginAsync after calling it, returns the response which is not correct.
So finally while I have added this version again I'm getting this exception,
System.InvalidOperationException: IDX20803: Unable to obtain configuration from: '***********:443/.well-known/openid-configuration'. Will retry at '8/12/2024 8:12:41 AM +00:00'. Exception: 'System.IO.IOException: IDX20807: Unable to retrieve document from: '[PII of type 'System.String' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'. HttpResponseMessage: '[PII of type 'Xamarin.Android.Net.AndroidHttpResponseMessage' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]', HttpResponseMessage.Content: '[PII of type 'System.String' is hidden. For more details, see https://aka.ms/IdentityModel/PII.]'. at Microsoft.IdentityModel.Protocols.HttpDocumentRetriever.GetDocumentAsync(String address, CancellationToken cancel) at Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfigurationRetriever.GetAsync(String address, IDocumentRetriever retriever, CancellationToken cancel) at Microsoft.IdentityModel.Protocols.ConfigurationManager
1.1.<GetConfigurationAsync>d__17[[Microsoft.IdentityModel.Protocols.OpenIdConnect.OpenIdConnectConfiguration, Microsoft.IdentityModel.Protocols.OpenIdConnect, Version=6.34.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]].MoveNext() at Microsoft.IdentityModel.Protocols.ConfigurationManager
1.1 pointInTime, ISignatureVerifier signatureVerifier) at Auth0.OidcClient.Auth0ClientBase.LoginAsync(Object extraParameters, CancellationToken cancellationToken) at BobThePhysio.Mobile.Infrastructure.Services.AuthorizationService.LoginAsync() in /Users/alikarimi/Projects/BobDePhisio/src/BobThePhysio.Mobile.Infrastructure/Services/AuthorizationService.cs:line 27
Checklist
Description
Adding login to my MAUI app by following the official Auth0 blog post works well (https://auth0.com/blog/add-authentication-to-dotnet-maui-apps-with-auth0/). LoginAsync() returns correctly, the user can be logged in, etc.
However, simply adding the IdentityTokenValidator package causes the crash. No need to add any other code (this is what the 2nd blog posts recommends: https://auth0.com/blog/managing-tokens-in-dotnet-maui/ )
Now the LoginAsync crashes.
Reproduction
Additional context
No response
auth0-oidc-client-net version
1.0.1
.NET version
8.0.302
Platform
Android, iOS
Platform version(s)
any