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),