Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Bearer token not working with [Authorize] as @attribute

$
0
0

I cannot figure how to use @attribute [Authorize] in razor component with Bearer token authentication. When I decorate API controller with [Authorize] and attach bearer token to header, its working nicely. When I use same attribute in razor component it always throw 401.

I tried using multiple schemas with fallbacks

@attribute [Authorize(AuthenticationSchemes = "Identity.BearerAndApplication, Identity.Bearer, Identity.Application, Identity.External")]

but did not help. What am I doing wrong?

Thanks.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>