Update AuthServiceProvider

This commit is contained in:
Daniel Supernault 2019-09-30 23:36:37 -06:00
parent e10b2b93a4
commit dbcd5ff2e4
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -4,7 +4,7 @@ namespace App\Providers;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Laravel\Passport\Passport; use Laravel\Passport\Passport;
use Gate, Route; use Gate;
class AuthServiceProvider extends ServiceProvider class AuthServiceProvider extends ServiceProvider
{ {
@ -27,9 +27,7 @@ class AuthServiceProvider extends ServiceProvider
$this->registerPolicies(); $this->registerPolicies();
if(config('pixelfed.oauth_enabled')) { if(config('pixelfed.oauth_enabled')) {
Route::group(['middleware' => 'cors'], function() { Passport::routes();
Passport::routes();
});
Passport::tokensExpireIn(now()->addDays(15)); Passport::tokensExpireIn(now()->addDays(15));
Passport::refreshTokensExpireIn(now()->addDays(30)); Passport::refreshTokensExpireIn(now()->addDays(30));
Passport::enableImplicitGrant(); Passport::enableImplicitGrant();