Blazor Server calling authenticated web APIs

In my Blazor Server app, the user authenticated using openid, and then in the app, I display data based on calling some external APIs using HttpClient and setting the "Authorization" header with the access token obtained from the login.

But I will also need to handle any unauthorized response from calling the external APIs with HttpClient.

Is there a better/simpler way?



Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)