Auth0 Home Blog Docs

Using Auth0.OidcClient.iOS cannot login pass-wordlessly



Hi there,

We are developing an Xamarin app, which uses Auth0 Oidc client for it’s authentication.

Both Xamarin Android and iOS work fine yesterday, but this morning the iOS version start to fail. In addition, Android version still works fine, so I don’t think it’s a config issue.

In the Xamarin iOS code, I used the LoginAsync to get the access token and other necessary information of users, which is as follows.

“var loginResult = await _auth0Client.LoginAsync();”

After enter the email address, and input the verification code in inbox, the Auth0 authentication finished, I got the “loginResult” with errors.

The error is as follows:

"Error validating token response: Error validating identity token: Microsoft.IdentityModel.Tokens.SecurityTokenInvalidSignatureException: IDX10511: Signature validation failed. Keys tried: ‘[PII is hidden]’. \nkid: ‘[PII is hidden]’. \nExceptions caught:\n ‘[PII is hidden]’.\ntoken: ‘[PII is hidden]’.\n

at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateSignature (System.String token, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters) [0x002ff] in C:\agent2\_work\56\s\src\System.IdentityModel.Tokens.Jwt\JwtSecurityTokenHandler.cs:966 \n
at System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.ValidateToken (System.String token, Microsoft.IdentityModel.Tokens.TokenValidationParameters validationParameters, Microsoft.IdentityModel.Tokens.SecurityToken& validatedToken) [0x000d7] in C:\agent2\_work\56\s\src\System.IdentityModel.Tokens.Jwt\JwtSecurityTokenHandler.cs:718 \n
at IdentityModel.OidcClient.IdentityTokenValidator.ValidateSignature (System.String identityToken, System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler handler, Microsoft.IdentityModel.Tokens.TokenValidationParameters parameters) [0x0013f] in C:\local\identity\model\OidcClient2\src\IdentityModel.OidcClient\IdentityTokenValidator.cs:189 \n
at IdentityModel.OidcClient.IdentityTokenValidator+<ValidateAsync>d__4.MoveNext () [0x00184] in C:\local\identity\model\OidcClient2\src\IdentityModel.OidcClient\IdentityTokenValidator.cs:98 "

It looks definitely like a backtrace of internal exception. Our team is blocked by this issue. Could we have any support from Auth0 team?

Thanks in advance!

BTW, does anyone meet the same issue like us?


I have fixed this issue by myself. Just let other guys know.

One of our team member update all the NuGet packages, so it destroied the dependency of Auth0 lib.

The solution is that remove all the Auth0 packages and Microsoft identity/token/jwt stuff(they were installed automatically by Nuget package manager when installing Auth0 libs).

The root cause is Auth0 lib using older version of Microsoft packages, and newer version would cause internal errors.