I'm trying to authenticate using SKD version Auth0.OidcClient.Android 3.2.3. and I get error when I call LoginAsync()
System.InvalidOperationException:** 'Error loading discovery document: Error connecting to https://frt-dev.us.auth0.com/.well-known/jwks.json. The type initializer for 'System.Text.Json.JsonSerializer' threw an exception..'
here are my code samples:
[assembly: Dependency(typeof(AuthenticationService))]
namespace FRT_EmpTemp.Droid.LocalServices
{
public class AuthenticationService: IAuthenticationService
{
private Auth0Client _auth0Client;
public AuthenticationService()
{
_auth0Client = new Auth0Client(new Auth0ClientOptions
{
Domain = "MY Domain is Writen here",
ClientId = "And some ID here"
});
}
public async Task<string> Authenticate()
{
var res = await _auth0Client.LoginAsync(); // exception is thrown here.
return res.AccessToken;
}
}
}
This is a known issue with the OpenID client we are using that I am looking into. Can you try and see if installing the latest System.Text.Json solves the problem for you?
Description
I'm trying to authenticate using SKD version
Auth0.OidcClient.Android 3.2.3
. and I get error when I call LoginAsync()here are my code samples: