F
Filament6mo ago
Samir

Unable to login to panels in Production

I can log in to all my filament panels in my local environment but not on production. And I get no error. Other details: —Three separate Filament panels using separate authentication guards (web, sellers, buyers). — Hosted on a managed VPS in a sub-domain for testing. — All public pages and publicly accessible database content are visible. — All my models (User, Buyer, Seller) are Authenticatable implements FilamentUser — Currently, all these models have the below method for accessing the panel:
public function canAccessPanel(Panel $panel): bool
{
return true;
}
public function canAccessPanel(Panel $panel): bool
{
return true;
}
I didn't implement the current following code because I have users in all panels with different domains. For example, Sellers or Buyers can have their domain emails so that way my emails will be different.
public function canAccessPanel(Panel $panel): bool
{
return str_ends_with($this->email, '@yourdomain.com') && $this->hasVerifiedEmail();
}
public function canAccessPanel(Panel $panel): bool
{
return str_ends_with($this->email, '@yourdomain.com') && $this->hasVerifiedEmail();
}
I have seen it in my database and the record is created. Registration is also happening but I am not able to login in production. Please help.
Solution:
Your server configuration doesn't allow loading JS files through PHP so it's not loading livewire.js
Jump to solution
3 Replies
Dennis Koch
Dennis Koch6mo ago
There IS an error in the JS console:
No description
Solution
Dennis Koch
Dennis Koch6mo ago
Your server configuration doesn't allow loading JS files through PHP so it's not loading livewire.js
Samir
Samir6mo ago
Thnaks @Dennis Koch . my issue is resolved. It was error at both end. Server configuration. And i had Livewire package installed alogside Filament which was not needed. so may be livewire conflicts.