How to prevent the default route and redirect to another?

I need something like “preroute” in V1, to prevent the default route when user is not login, and redirect to login page. After that, continue with the original route. How to do that in V2? async method of routes options? Or something else? How? Thanks.

1 Like

Yes, async may work for that