Login not working it's refreshing the page
I have installed Filament in a Laravel application but when I want to log in and enter the correct credentials the page is refershing. The input fields are cleared but I'm not logged in. When I enter the wrong credentials I get an error message. So I assume that everything works for login only the last step to actually login is not working. Has someone any idea how to debug it more? Or even how to fix this?
20 Replies
Check your error logs
I don't get anything in my error logs
inspect the browser console, on logging in do you see any issues?
Console log also nothing
And then result of the network request from clicking login?
I've opened the Authenticate class from Filament it looks like something is going wrong here:
The guard is false so it will go in to the if statement. But the credentials are correct that's the strange part. When I enter not the correct credentials then it will show a message with credentials wrong
Make sure your AdminPanelPrivider has ->default() on it.
It have the ->default() on it.
Is it a Laravel/Filament fresh install?
It's in a Laravel 11 application that I've created couple weeks ago with only some API endpoints I've added a fresh Filament install to it.
You should create another fresh install and check if it works..
I've created another fresh install with Laravel 11 with Filament that works but I've checked all the things and everything is the same. So I don't get it why it's not working in an existing Laravel project?
so, they are different π€·ββοΈ
But where π€ It is something with the guard I think. The hole login process is working for checking etc. but when it comes to the guard in authenticate then the guard->checks() is false.
So something is going wrong with the guard but I've no idea what when I dump both the guards (existing laravel and the fresh one) both are the same also the request are the same. The only thing is that the fresh install is $guard->checks() is true and in the existing one is it false.
something is wrong in your project, not in Filament I guess
Do you have any idea what is maybe wrong? Or a direction in where I can search?
hum.. no
It's something with the session/cookie. I've installed breeze also and that's also not working.
Moving all models and migrations to the new app would be more efficient than spending time with this issue π
I've found the issue. The session table want to have a integer as user_id but I'm using a uuid as id for the user so the session is not linked to the user.