Skip to content

Consistent 404s after login on Laravel 9 #8

@joereynolds

Description

@joereynolds

Hello!

I saw issue #4 and I thought it might solve my problem but unfortunately it doesn't help.

The problem

After installing the project via composer, I then add the middleware:

diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php
index 9fb429db..2a6c3058 100644
--- a/app/Http/Kernel.php
+++ b/app/Http/Kernel.php
@@ -35,6 +35,7 @@ class Kernel extends HttpKernel
             \App\Http\Middleware\EncryptCookies::class,
             \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
             \Illuminate\Session\Middleware\StartSession::class,
+            \CodeZero\StageFront\Middleware\RedirectIfStageFrontIsEnabled::class,
             // \Illuminate\Session\Middleware\AuthenticateSession::class,
             \Illuminate\View\Middleware\ShareErrorsFromSession::class,
             \App\Http\Middleware\VerifyCsrfToken::class,

(Note this is the only place to add it, there is no $middlewarePriority for Laravel 9 from what I can tell).

After this, I add these .env values

STAGEFRONT_ENABLED=TRUE
STAGEFRONT_LOGIN=test
STAGEFRONT_PASSWORD=password

The stagefront page loads successfully but any successful or unsuccessful logins get immediately redirected to a 404.
I have cleared and populated the cache with route:cache and ran into the same problems.

Thanks, and I hope you can help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions