-
Hi, |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
We already have dusk tests covering the use case: https://github.com/laravel/nova-dusk-suite/blob/cdeec6d57f22b308cbd07568d6853598be404f4e/tests/Browser/AuthenticatesUserTest.php#L69-L107 Will need full detail on how to reproduce the issue before we can consider this as a bug. |
Beta Was this translation helpful? Give feedback.
-
Actually you can reproduce that by following the steps below: you will get 404 error |
Beta Was this translation helpful? Give feedback.
-
CleanShot.2022-05-30.at.19.34.54.mp4Unable to reproduce, the page will automatically redirect to login on the next notification polling interval or clicking on any page. |
Beta Was this translation helpful? Give feedback.
-
Let me tell you another way to reproduce it: Lets say you have a resource named customers and a nova tool named Charts 1)Open google chrome and add the following url in the address bar : 127.0.0.1:8000/nova/resources/customers So in step 1 the redirection works as expected but when you try to navigate to a tool address the redirection not working SolutionYou can add |
Beta Was this translation helpful? Give feedback.
Let me tell you another way to reproduce it:
Lets say you have a resource named customers and a nova tool named Charts
1)Open google chrome and add the following url in the address bar : 127.0.0.1:8000/nova/resources/customers
It will automatically redirect you to : 127.0.0.1:8000/nova/login
2) Open google chrome and add the following url in the address bar : 127.0.0.1:8000/nova/charts
You will get 404 error "page not found"
So in step 1 the redirection works as expected but when you try to navigate to a tool address the redirection not working
Solution
You can add
Laravel\Nova\Http\Middleware\Authenticate
middleware to Tool's inertia routes to redirect guest user to login page instead …