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

Get failed requirement or policy in AuthorizeRouteView.NotAuthorized

$
0
0

I use the <AuthorizeRouteView> component in a Blazor WASM application to check the user's authorization with respect to the current page. The page has appropriate [Authorize] attributes applied to it.

The <NotAuthorized> attribute of the view allows to add components for the case when the user is not authorized to access the page. Is there a way to find the reason why the user is not authorized (i.e., more or less get the content of the page's [Authorize] attribute)? This is especially important if the user can do something about the failed authorization requirement. E.g., when a specific page requires multi-factor authentication, I would like to prompt the user to provide an additional factor rather than just telling him that he is not authorized to view this page.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



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