From 2ddad9d85106a8555c7a01d7e5ecd9ba1a7bc404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Jaussoin?= Date: Fri, 28 Jul 2023 10:22:19 +0200 Subject: [PATCH] Fix #111 Disable phone authentication routes when the related toggle is set to false --- flexiapi/routes/web.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/flexiapi/routes/web.php b/flexiapi/routes/web.php index ed94521..6c12197 100644 --- a/flexiapi/routes/web.php +++ b/flexiapi/routes/web.php @@ -29,9 +29,11 @@ if (config('app.web_panel')) { Route::get('authenticate/email/check/{sip}', 'Account\AuthenticateController@checkEmail')->name('account.check.email'); Route::get('authenticate/email/{code}', 'Account\AuthenticateController@validateEmail')->name('account.authenticate.email_confirm'); - Route::get('login/phone', 'Account\AuthenticateController@loginPhone')->name('account.login_phone'); - Route::post('authenticate/phone', 'Account\AuthenticateController@authenticatePhone')->name('account.authenticate.phone'); - Route::post('authenticate/phone/confirm', 'Account\AuthenticateController@validatePhone')->name('account.authenticate.phone_confirm'); + if (config('app.phone_authentication')) { + Route::get('login/phone', 'Account\AuthenticateController@loginPhone')->name('account.login_phone'); + Route::post('authenticate/phone', 'Account\AuthenticateController@authenticatePhone')->name('account.authenticate.phone'); + Route::post('authenticate/phone/confirm', 'Account\AuthenticateController@validatePhone')->name('account.authenticate.phone_confirm'); + } Route::get('authenticate/qrcode/{token?}', 'Account\AuthenticateController@loginAuthToken')->name('account.authenticate.auth_token'); }