From 0547bfe494a554c67fe5bac58ec1ac3491baae56 Mon Sep 17 00:00:00 2001 From: "p.hollmann" <31701319+paulhollmann@users.noreply.github.com> Date: Sat, 3 Aug 2024 10:00:07 +0200 Subject: [PATCH] update --- app/Access/Controllers/ConnectController.php | 8 ++++++-- app/Config/connect.php | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/app/Access/Controllers/ConnectController.php b/app/Access/Controllers/ConnectController.php index 176cd9edbcd..ea48e6f31cc 100644 --- a/app/Access/Controllers/ConnectController.php +++ b/app/Access/Controllers/ConnectController.php @@ -20,14 +20,18 @@ class ConnectController extends Controller /** * The Authentication Provider Instance */ - protected VatgerConnectProvider $provider; + protected VatsimConnectProvider|VatgerConnectProvider $provider; /** * Initialize the Controller with a new ConnectProvider instance */ public function __construct() { - $this->provider = new VatgerConnectProvider(); + if (config('connect.use_vatger')) { + $this->provider = new VatgerConnectProvider(); + } else { + $this->provider = new VatsimConnectProvider(); + } } /** diff --git a/app/Config/connect.php b/app/Config/connect.php index b361d68b571..b41249507bb 100644 --- a/app/Config/connect.php +++ b/app/Config/connect.php @@ -1,5 +1,6 @@ env('USE_VATGER_AUTH', false), 'name' => env('VATSIM_OAUTH_NAME', 'VATSIM Connect'), 'base' => env('VATSIM_OAUTH_BASE', 'https://auth-dev.vatsim.net'), 'id' => env('VATSIM_OAUTH_CLIENT', 0),