Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect to Error Page on Authorisation Failure #70

Open
StuartFerguson opened this issue Aug 1, 2024 · 1 comment
Open

Redirect to Error Page on Authorisation Failure #70

StuartFerguson opened this issue Aug 1, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@StuartFerguson
Copy link

I have built my own version of the IHydroAuthorizationFilter and attached to to my page which now doesn't render as per the documentation.

What I was wondering though is if there is any way of redirecting the user to a "Permission Denied" page in the application rather than just showing an empty page to enhance the user experience.

Thanks In Advance,

Stuart Ferguson

@kjeske
Copy link
Contributor

kjeske commented Aug 3, 2024

For now there is no way to change that, but probably Hydro should have a way to specify a custom default component to render in such cases, like:

services.AddHydro(options =>
{
    options.AuthorizationFallbackComponent = typeof(NotAuthorized);
});

@kjeske kjeske added the enhancement New feature or request label Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants