You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the ApplicationBuilder, on line 278, the application's global middleware is configured to redirect unauthenticated (guest) users to route('login'). This causes issues if the application does not have any such 'login' route defined.
Steps To Reproduce
If the 'auth' middleware is applied on a route, and the application has no route named 'login', any guests visiting this route will not be redirected correctly.
There are a few workarounds to this:
If using the 'auth' middleware, manually configure the redirect route in AppServiceProvider.php
This discussion was converted from issue #57133 on September 22, 2025 01:25.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Laravel Version
12.30.1
PHP Version
8.4.12
Database Driver & Version
No response
Description
In the ApplicationBuilder, on line 278, the application's global middleware is configured to redirect unauthenticated (guest) users to
route('login')
. This causes issues if the application does not have any such'login'
route defined.Steps To Reproduce
If the 'auth' middleware is applied on a route, and the application has no route named 'login', any guests visiting this route will not be redirected correctly.
There are a few workarounds to this:
If using the 'auth' middleware, manually configure the redirect route in AppServiceProvider.php
Or alternatively, add this to the body of the withMiddleware callback in \bootstrap\app.php
It would be nice if the implementation did not rely on the existence of a route named 'login'.
Beta Was this translation helpful? Give feedback.
All reactions