This commit is contained in:
Daniel Supernault 2023-05-07 05:18:59 -06:00
parent eda7607fe8
commit 637cdca27a
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -24,7 +24,7 @@ class AuthServiceProvider extends ServiceProvider
*/ */
public function boot() public function boot()
{ {
if(config_cache('pixelfed.oauth_enabled') == true) { if(config('app.env') === 'production' && config_cache('pixelfed.oauth_enabled') == true) {
Passport::tokensExpireIn(now()->addDays(config('instance.oauth.token_expiration', 356))); Passport::tokensExpireIn(now()->addDays(config('instance.oauth.token_expiration', 356)));
Passport::refreshTokensExpireIn(now()->addDays(config('instance.oauth.refresh_expiration', 400))); Passport::refreshTokensExpireIn(now()->addDays(config('instance.oauth.refresh_expiration', 400)));
Passport::enableImplicitGrant(); Passport::enableImplicitGrant();