You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm using Identity Cookies for authentication (and authorization)?
This is a blazor web app.
It has an api also. if the api does not have [Authorize] all is well. If it does I get a 401 when accessing the api via httpclient/httpclientfactory.
I had assumed the cookies would have been passed along automatically but was a wrong assumption.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I'm using Identity Cookies for authentication (and authorization)?
This is a blazor web app.
It has an api also. if the api does not have [Authorize] all is well. If it does I get a 401 when accessing the api via httpclient/httpclientfactory.
I had assumed the cookies would have been passed along automatically but was a wrong assumption.
I am at this page https://learn.microsoft.com/en-us/aspnet/core/fundamentals/http-requests?view=aspnetcore-3.1#header-propagation-middleware
And probably have to use something like header propagation but am not sure how to use it with identity cookies.
How can I authorize against the api if i am using IdentityCookies
Beta Was this translation helpful? Give feedback.
All reactions