Hi Team,
My scenario is - I have two API which means I have two audience created in Auth0 dashboard. And both APIs are working as expected.
However, when I am trying to invoke those APIs from Blazor WASM one of the API fetching data and the other one is getting invalid audience.
I am using .NET 6 where Team introduced AdditionalProviderParameters
so for one of API I have added -
builder.Services.AddOidcAuthentication(options =>
{
builder.Configuration.Bind("Auth0", options.ProviderOptions);
options.ProviderOptions.ResponseType = "code";
options.ProviderOptions.AdditionalProviderParameters.Add("audience", "https://quizapi.sarkaran.ml/");
});
Which seems to be working fine. However When I am adding another audience, it starts failing -
builder.Services.AddOidcAuthentication(options =>
{
builder.Configuration.Bind("Auth0", options.ProviderOptions);
options.ProviderOptions.ResponseType = "code";
options.ProviderOptions.AdditionalProviderParameters.Add("audience", "https://quizapi.sarkaran.ml/");
options.ProviderOptions.AdditionalProviderParameters.Add("audience", "https://weatherforecastapi.sarkaran.ml/"); // <- That seems to be not working.
});
I have tried by setting Default Audience from Setting as well, but no luck. So my question is in case I need to call more than API how to set the audience?