[5.x] Route ['login'] not defined when running nova on a subdomain
- Dominant language
- No language data
- Stars
- 557
- Forks
- 33
- PR merge metrics
- No merged PRs in 30d
Description
- Laravel Version: 12.0
- Nova Version: 5.7
- PHP Version: 8.4
### Description:
Since the issue is still present, I've opened a new issue.
The problem was to a degree talked about here: #6274
I have a setup where I have defined NOVA_DOMAIN to be "nova.app.test".
Meaning that my web runs on app.test, but nova is served from nova.app.test.
The app has inertia frontend with it's own authentication routes.
When I open nova.app.test, I get
Route [login] not defined.
I was originally using the redirectGuestsTo, but since now I have also frontend authentication separate from nova, this is starting to become a problem.
```
->withMiddleware(function (Middleware $middleware): void {
$middleware->redirectGuestsTo('login'); // <-- this
$middleware->web(append: [
HandleInertiaRequests::class,
]);
})
```
Any further assistance would be appreciated.
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the setup with NOVA_DOMAIN set to nova.app.test, app.test hosting the Inertia frontend, and redirectGuestsTo('login') configured in the middleware snippet. Start by tracing how Nova's subdomain request handles guest redirection and the missing login route, using the referenced discussion in #6274 for context. Done means opening nova.app.test no longer raises Route [login] not defined while the separate frontend authentication routes continue to work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- laravel, php
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100