question

MihaelaBota avatar image
MihaelaBota asked

Issues using C# OpenId library

We are using the C# OpenId library to get the token and we get the following error: Error loading discovery document: Endpoint belongs to different authority: https://api.fusionfabric.cloud/login/v1/oidc/jwks.json. Is there a parameter we are missing or we should review?

Authentication
3 comments
10 |600

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Hicham Felloussi avatar image Hicham Felloussi ♦♦ commented ·

what is the value of the Discover authority in your code ?

0 Likes 0 ·
Hicham Felloussi avatar image Hicham Felloussi ♦♦ commented ·


authorization-uri: <%authorization-endpoint%>

token-uri: <%token-endpoint%>

jwk-set-uri: <%jwks_uri%>

and %jwks_uri% is

https://api.fusionfabric.cloud/login/v1/oidc/jwks.json

so yes this the param


could try and let us know

THanks

Hicham


0 Likes 0 ·
MihaelaBota avatar image MihaelaBota commented ·

IdentityModel.OidcClient.OidcClient.<EnsureProviderInformationAsync>d__17.MoveNext

0 Likes 0 ·

1 Answer

Olivier Leborne avatar image
Olivier Leborne answered

Hi

Please use the following option configuration code:

var options = new OidcClientOptions
            {
                Authority = "https://api.fusionfabric.cloud/login/v1/sandbox",
                ClientId = "MY_CLIENT_ID_FOR_DIGITAL_OR_B2E_CHANNEL",
                ClientSecret = "MY_SECRET",
                Scope = "openid",
                RedirectUri = "http://my.reply.url",
                Flow = OidcClientOptions.AuthenticationFlow.AuthorizationCode,
                Browser = new WinFormsEmbeddedBrowser(),
                LoadProfile = false
            };
options.Policy = new Policy() ;
options.Policy.Discovery = new DiscoveryPolicy() { AdditionalEndpointBaseAddresses = new List<string>() { "https://api.fusionfabric.cloud/login/v1" }, ValidateIssuerName = false };
10 |600

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.