Browse Source

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
Emelia Smith 1 year ago
parent
commit
fcdfc73eaf
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Providers/AuthServiceProvider.php

+ 1 - 1
app/Providers/AuthServiceProvider.php

@@ -24,7 +24,7 @@ class AuthServiceProvider extends ServiceProvider
      */
      */
     public function boot()
     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::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();