Update AuthServiceProvider

This commit is contained in:
Daniel Supernault 2019-10-01 18:31:05 -06:00
parent 8e22909942
commit 0397c959f0
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -27,7 +27,7 @@ class AuthServiceProvider extends ServiceProvider
$this->registerPolicies(); $this->registerPolicies();
if(config('pixelfed.oauth_enabled')) { if(config('pixelfed.oauth_enabled')) {
Passport::routes(); Passport::routes(null, ['middleware' => [ \Barryvdh\Cors\HandleCors::class ]]);
Passport::tokensExpireIn(now()->addDays(15)); Passport::tokensExpireIn(now()->addDays(15));
Passport::refreshTokensExpireIn(now()->addDays(30)); Passport::refreshTokensExpireIn(now()->addDays(30));
Passport::enableImplicitGrant(); Passport::enableImplicitGrant();