Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 10 Upgrade - Login on Nova is causing a redirect loop #5637

Closed
tiagoraposeiraff opened this issue Jun 22, 2023 · 4 comments
Closed

Comments

@tiagoraposeiraff
Copy link

  • Laravel Version: 10.13.5
  • Nova Version: 4.25.1
  • PHP Version: 8.2.3

Description:

After upgrading the Laravel version from v9.52.6 to v10.13.5 the Nova login stopped working.
It keeps returning a 302 status causing a Too Many Redirects Issue.

It goes from /nova to /nova/login, back and forth.
I was able to determine via var_dump that when reaching the LoginController::authenticated() method the user is there and it's valid.
But when it reaches the Authenticate::authenticate() middleware method and tries to perform the auth check, it always returns false, on ln 63: if ($this->auth->guard($guard)->check())

I also confirmed that the $guard variable is correct (web).

I search the web for similar issues and I couldn't find any, which led me to asking for some help here with this (possible) bug.

@davidhemphill davidhemphill added the needs more info More information is required label Jun 22, 2023
@crynobone
Copy link
Member

Unable to reproduce the issue and we don't have enough information to replicate this

Please provide full reproducing repository based on fresh installation as suggested in the bug report template (or you can refer to https://github.com/nova-issues for example)

@thond1st
Copy link

thond1st commented Jun 29, 2023

Hi,

Also experiencing redirect loops when accessing /nova then it redirects to nova/login repeatedly
Just upgraded from an existing Laravel Nova 3 to Laravel Nova 4 following the upgrade guide up to the section before the High Impact Changes. Other none nova routes are working fine like our /log-viewer and /docs

Everything worked fine but I needed to remove some packages:
"outl1ne/nova-multiselect-filter": "^2.0"
"pos-lifestyle/laravel-nova-date-range-filter": "^1.3"

"laravel/framework": "^8.0",
"laravel/nova": "^4.0",
PHP version 7.4
Using Laravel Passport and upgraded it from 9 to 10

Thanks

@stale stale bot removed the stale label Jun 29, 2023
@tiagoraposeiraff
Copy link
Author

@thond1st can you elaborate on that?
It seems you're having the issue, but on Laravel 8, correct?
Did removing those packages fixed the issue entirely? How did you debug/found out those were the problem?

Thanks!

@thond1st
Copy link

thond1st commented Jul 1, 2023

@thond1st can you elaborate on that? It seems you're having the issue, but on Laravel 8, correct? Did removing those packages fixed the issue entirely? How did you debug/found out those were the problem?

Thanks!

Hi @tiagoraposeiraff ,
Yes, I am on Laravel 8. Planning to move slowly to a later version where all 3rd party packages will be working.
Removing the packages solved the composer update errors.
I just fixed the nova/login redirect loop yesterday. I had a mistake merging Nova 3 web middleware with the one from Nova 4 inside config/nova.php. Some of the old lines shouldn't be there. Please see screenshot below.
image

@crynobone crynobone removed the needs more info More information is required label Jul 2, 2023
@laravel laravel locked and limited conversation to collaborators Jul 2, 2023
@crynobone crynobone converted this issue into discussion #5672 Jul 2, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants