From fcdfc73eafec476a0ff64731b34aa7d85c4e034e Mon Sep 17 00:00:00 2001 From: Emelia Smith Date: Sat, 30 Mar 2024 00:17:20 +0100 Subject: [PATCH] Remove production environment check in AuthServiceProvider This check resulted in the /oauth/scopes route returning nothing, meaning in development you couldn't use access tokens with scopes; It probably also affected other logic --- app/Providers/AuthServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php index 4301fc81..1a41b9e5 100644 --- a/app/Providers/AuthServiceProvider.php +++ b/app/Providers/AuthServiceProvider.php @@ -24,7 +24,7 @@ class AuthServiceProvider extends ServiceProvider */ public function boot() { - if(config('app.env') === 'production' && config('pixelfed.oauth_enabled') == true) { + if(config('pixelfed.oauth_enabled') == true) { Passport::tokensExpireIn(now()->addDays(config('instance.oauth.token_expiration', 356))); Passport::refreshTokensExpireIn(now()->addDays(config('instance.oauth.refresh_expiration', 400))); Passport::enableImplicitGrant();