'App\Policies\ModelPolicy', ]; /** * Register any authentication / authorization services. * * @return void */ public function boot() { if(config('app.env') === 'production' && config_cache('pixelfed.oauth_enabled') == true) { Passport::tokensExpireIn(now()->addDays(config('instance.oauth.token_expiration', 356))); Passport::refreshTokensExpireIn(now()->addDays(config('instance.oauth.refresh_expiration', 400))); Passport::enableImplicitGrant(); if(config('instance.oauth.pat.enabled')) { Passport::personalAccessClientId(config('instance.oauth.pat.id')); } Passport::setDefaultScope([ 'read', 'write', 'follow', ]); Passport::tokensCan([ 'read' => 'Full read access to your account', 'write' => 'Full write access to your account', 'follow' => 'Ability to follow other profiles', 'push' => '' ]); } // Gate::define('viewWebSocketsDashboard', function ($user = null) { // return $user->is_admin; // }); } }