laraveltelescope

Laravel Telescope 403 production


Won't work for me in production no matter what:

 protected function gate()
    {
        Gate::define('viewTelescope', function ($user) {
            return true;
        });
    }

In production always gives me 403, thought the database entries are all being created.


Solution

  • The problem was that I'm using a custom "admin" guard, and laravel telescope has no option to specifically change the guard, so I had to put the "admin" guard as default in the "config/auth" file:

    'defaults' => [ 'guard' => 'admin', 'passwords' => 'users', ],