Login not working (Production)
I need help fixing my login page, it works on local server with the same setup. I also added session_domain and app_url in env file. When i try to login it keeps redirecting me back to login page.
Solution:Jump to solution
Thanks the problem was in livewire. I forgot to remove/comment this line of code in my service app provider.
```
Livewire::setUpdateRoute(function ($handle) {
return Route::post('/custom/livewire/update', $handle);
});...
11 Replies
check laravel logs. also have you implemented the
FilamentUser
on the User model with the canAccessPanel
method?Yes i already did and also im using filament shield
how does your canAccessPanel looks like?
public function canAccessPanel(Panel $panel): bool
{
if ($this->roles->count() == 0) {
return false;
}
return $this->hasVerifiedEmail();
}
what's the point of checking if there are any roles? double check if you really have any of them
@Jap also
is better than
and outputs the same
u can test it if u want ^^
thank you ill try this
Still not working this is my current source code for my user model.
I think it isn't necessary
$this->hasVerifiedEmail()
if you are using mustVerifyEmailI see, i tried only returning true on canAccessPanel same thing happens it just reloads then goes back to login page and
no errors in browser console
yes, not linked to the issue. I suggest reviewing the server configuration, ensuring Livewire requests are working properly..
Solution
Thanks the problem was in livewire. I forgot to remove/comment this line of code in my service app provider.
I'm using it to configure livewire's update endpoint if my app is deployed in
https://example.com/custom
.