From b9b71ee841861113d144b41deb9497aeae41158a Mon Sep 17 00:00:00 2001 From: J Humphries Date: Thu, 14 Nov 2024 14:02:44 -0600 Subject: [PATCH] resolve m365 oAuth user creation Block (#4440) Contributing fix discussed here: https://github.com/nilsteampassnet/TeamPass/issues/4440 Allows for the creation of oAuth based users from m365 tenants --- sources/identify.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sources/identify.php b/sources/identify.php index e2e2b4dec..cb2523075 100755 --- a/sources/identify.php +++ b/sources/identify.php @@ -2115,7 +2115,7 @@ public function getUserInfo($login, $enable_ad_user_auto_creation, $oauth2_enabl $oauth2LoginOngoing = isset($session->get('userOauth2Info')['oauth2LoginOngoing']) ? $session->get('userOauth2Info')['oauth2LoginOngoing'] : false; $data['oauth2_login_ongoing'] = $oauth2LoginOngoing; $data['ldap_user_to_be_created'] = $enable_ad_user_auto_creation === true && DB::count() === 0 && $oauth2LoginOngoing !== true ? true : false; - $data['oauth2_user_to_be_created'] = $oauth2_enabled === true && DB::count() === 0 && $oauth2LoginOngoing === true ? true : false; + $data['oauth2_user_to_be_created'] = (bool)$oauth2_enabled === true && DB::count() === 0 && $oauth2LoginOngoing === true ? true : false; return $data; } @@ -2687,4 +2687,4 @@ function identifyDoAzureChecks( 'mfaData' => ['message' => $lang->get('wrong_mfa_code')], 'mfaQRCodeInfos' => false, ]; -} \ No newline at end of file +}