Update AuthServiceProvider

This commit is contained in:
Daniel Supernault 2019-09-30 22:59:16 -06:00
parent 9528d97c0a
commit 6d6f517db0
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
2 changed files with 4 additions and 1 deletions

View file

@ -27,7 +27,9 @@ 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();

View file

@ -13,6 +13,7 @@
"ext-json": "*", "ext-json": "*",
"ext-mbstring": "*", "ext-mbstring": "*",
"ext-openssl": "*", "ext-openssl": "*",
"barryvdh/laravel-cors": "0.11.4",
"beyondcode/laravel-self-diagnosis": "^1.0.2", "beyondcode/laravel-self-diagnosis": "^1.0.2",
"doctrine/dbal": "^2.7", "doctrine/dbal": "^2.7",
"fideloper/proxy": "^4.0", "fideloper/proxy": "^4.0",