Skip to content

Router Component Authentication #1526

Open
@patrickisgreene

Description

@patrickisgreene

Question

I'm building a generic admin panel, I'm struggling implementing an authentication system that can work with the router component. In short it works by sending the browser a list of permissions then when a route is changed i can check this list and either allow the route change or redirect to an unauthorized error page.

Is there a way to do this with the Router component?

What I've tried (optional)

I've been able to do this by not using the router component and using RouteService::register_callback, i would just prefer to be able to use the included component.

Ideally i think it would be helpful to add a filter function similar to render & redirect in the router props that will map a route to another route Fn(SW) -> SW by default this could just pass the route on unchanged and would give a place to modify the route before the change.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions