IdentityModel.OidcClient
IdentityModel.OidcClient copied to clipboard
Trust anchor for certification path not found
I'd like to connect a xamarin app to and identity server (locally on my machine, app is running in emulator) I follwed the sample code:
Client ` var browser = DependencyService.Get<IBrowser>();
var options = new OidcClientOptions
{
Authority = _httpConfig.DiscoveryUrl, // <- https://https://10.0.2.2:5501
ClientId = "xamarin",
Scope = "openid",
RedirectUri = "xamarinformsclients://callback",
Browser = browser,
RefreshTokenInnerHttpHandler = new HttpClientHandler()
};
_oidcClient = new OidcClient(options);
var _result = await _oidcClient.LoginAsync(new LoginRequest());`
Server ( https://127.0.0.1:5501)
{ "ClientId": "xamarin", "RequireClientSecret ": false, "AllowedGrantTypes": [ "code" ], "AllowedScopes": [ "openid" ], "RequirePkce": true, "RedirectUris": "xamarinformsclients://callback", "AllowAccessTokensViaBrowser": true, "RequireConsent": false }
this call var _result = await _oidcClient.LoginAsync(new LoginRequest());` causes this error: "Trust anchor for certification path not found"
Any ideas?
Sounds like an HTTPS issue