I have a website set up step by step after the external login instructions. I have added Support for mobile login after the xamarin webauthentication instructions.
Logging in works fine by now, but accessing a controller with [Authorize] attribute just won't happen.
Looking at the sample WebAuthenticator in Xamarin.Essentials. After receiving the access_token, how do I use it for another HttpClient request?
I was assuming it was a Bearer, so I tried:
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", App.AccessToken);
I still get 401 from the service.
Same with postman. It is a bearer token from the properties when I receive it in aspnet. It feels like something is missing in the web service configuration.
I tried adding .AddJwtBearer(); but same result so far...