1
0
Fork 0
forked from mirror/pixelfed

Update AuthServiceProvider

This commit is contained in:
Daniel Supernault 2021-05-11 23:45:01 -06:00
parent e379ae2cbd
commit 868cea96ca
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -26,7 +26,7 @@ class AuthServiceProvider extends ServiceProvider
{ {
$this->registerPolicies(); $this->registerPolicies();
if(config_cache('pixelfed.oauth_enabled')) { if(\config_cache('pixelfed.oauth_enabled')) {
Passport::routes(null, ['middleware' => ['twofactor', \Fruitcake\Cors\HandleCors::class]]); Passport::routes(null, ['middleware' => ['twofactor', \Fruitcake\Cors\HandleCors::class]]);
Passport::tokensExpireIn(now()->addDays(config('instance.oauth.token_expiration', 15))); Passport::tokensExpireIn(now()->addDays(config('instance.oauth.token_expiration', 15)));
Passport::refreshTokensExpireIn(now()->addDays(config('instance.oauth.refresh_expiration', 30))); Passport::refreshTokensExpireIn(now()->addDays(config('instance.oauth.refresh_expiration', 30)));