Now, the problem is how to add the authorization. If I remove it from the Program.cs and remove attribute in the API, I don't have any error. The issue is in the MyAuthorizationMessageHandler.
I still don't know how to fix it Update 3 Now, I can replicate the issue only with Chrome in Incognito mode. In Blazor, in the Program.cs I added a HttpClient for each service like that (Ĭlient => client.BaseAddress = new Uri($", Options.ApiSecret = apiSettings.ApiSecret Options.Authority = apiSettings.Authority AddIdentityServerAuthentication(options => IdentityServerAuthenticationDefaults.AuthenticationScheme) In the API project, I added the authentication services.AddAuthentication( Renderer.GetErrorHandledTask(Taskīoth the applications are hosted in Azure. HttpCompletionOption completionOption, Boolean async, BooleanĮmitTelemetryStartStop, CancellationToken cancellationToken) at SendAsyncCore(HttpRequestMessage request, LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage Device: The ID is accessible to all apps installed on the device. Group of apps: The ID is accessible to a pre-defined group of related apps. Android identifier scope generally comes in three flavors: Single app: The ID is internal to the app and not accessible to other apps. Request, CancellationToken cancellationToken) at Identifier scope explains which systems can access the identifier. Unhandled exception rendering component: 'janssen_api' .Authentication.AccessTokenNotAvailableException: When the user clicks on other pages, an error occurs.Īt the beginning I thought it was a cache browser problem. The first page calls the API and display the content correctly. When the client started to use, he has an error. I tested the website in all my laptops and it is working. So, a user can click on a page and he see the content that is coming from the APIs. The user is authenticated against Identity Server and there is a Api Key ( janssen_api in the following image) for the communication between Blazor and the APIs. The authentication is based on Identity Server. I have a Blazor WebAssembly website that calls APIs to read/write data.