From bc9b47c46dcf2906a7690781dabe27038cf60d69 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 10 May 2023 00:27:47 -0700 Subject: [PATCH] Removed env dependency, switched to DB Signed-off-by: snipe --- .env.example | 9 --------- config/app.php | 9 --------- config/services.php | 3 --- resources/views/auth/login.blade.php | 5 ++++- 4 files changed, 4 insertions(+), 22 deletions(-) diff --git a/.env.example b/.env.example index 08baf822f5..fbf5c4cfff 100644 --- a/.env.example +++ b/.env.example @@ -175,15 +175,6 @@ REQUIRE_SAML=false API_THROTTLE_PER_MINUTE=120 CSV_ESCAPE_FORMULAS=true - -# -------------------------------------------- -# OPTIONAL: GOOGLE LOGIN -# -------------------------------------------- -ENABLE_GOOGLE_LOGIN=false -GOOGLE_CLIENT_ID=null -GOOGLE_CLIENT_SECRET=null -GOOGLE_REDIRECT_URL=null - # -------------------------------------------- # OPTIONAL: HASHING # -------------------------------------------- diff --git a/config/app.php b/config/app.php index 2913bdc273..2559b8012c 100755 --- a/config/app.php +++ b/config/app.php @@ -218,15 +218,6 @@ return [ 'require_saml' => env('REQUIRE_SAML', false), - /* - |-------------------------------------------------------------------------- - | Enable Google Login - |-------------------------------------------------------------------------- - */ - - 'google_login' => env('ENABLE_GOOGLE_LOGIN', false), - - /* |-------------------------------------------------------------------------- | Demo Mode Lockdown diff --git a/config/services.php b/config/services.php index a0f25664f6..de8c4ed71a 100644 --- a/config/services.php +++ b/config/services.php @@ -51,9 +51,6 @@ return [ 'google' => [ 'maps_api_key' => env('GOOGLE_MAPS_API'), - 'client_id' => env('GOOGLE_CLIENT_ID'), - 'client_secret' => env('GOOGLE_CLIENT_SECRET'), - 'redirect' => env('GOOGLE_REDIRECT_URL'), ], ]; diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index 730afae833..4b7a1762e7 100755 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -78,8 +78,11 @@ @endif - @if ((config('app.google_login')) && (config('services.google.client_id')) && (config('services.google.client_secret')) && (config('services.google.redirect'))) + @if (($snipeSettings->google_login=='1') && ($snipeSettings->google_client_id!='') && ($snipeSettings->google_client_secret!='') && ($snipeSettings->google_redirect!=''))) +
+ Or +
{{ trans('auth/general.google_login') }}