Auth guard [] is not defined.

I upgraded a filament project from v2 to v3. Everything went on well based on the on the upgrade guide. However, when I try to access the admin panel https.example.com/admin/login, I'm getting Auth guard [] is not defined. error. I have not been able to wrap my head around it for over 1 hour now.
Solution:
Thanks @DrByte and @Dennis Koch for your contribution. I have found the issue. When I was in v2, I have Horizon and Telescope setup locally, and in their service provider, I have this block of code which was referencing the old filament config ```protected function authorization() { Auth::setDefaultDriver(config('filament.auth.guard'));...
Jump to solution
3 Replies
DrByte
DrByte12mo ago
Without seeing your code, or at least a Flare share URL, it's hard to give specific help. One great way to investigate is to build a fresh v3 app with just some very basics, and prove that this feature works, and then bolt-in more and more of your app to see where it breaks.
Dennis Koch
Dennis Koch11mo ago
Sounds like the PanelProvider is set to an empty authGuard
Solution
stanwarri
stanwarri11mo ago
Thanks @DrByte and @Dennis Koch for your contribution. I have found the issue. When I was in v2, I have Horizon and Telescope setup locally, and in their service provider, I have this block of code which was referencing the old filament config
protected function authorization()
{
Auth::setDefaultDriver(config('filament.auth.guard'));

parent::authorization();
}
protected function authorization()
{
Auth::setDefaultDriver(config('filament.auth.guard'));

parent::authorization();
}
Removing it solved the issue
Want results from more Discord servers?
Add your server