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.