Skip to content

Commit

Permalink
resolve m365 oAuth user creation Block (nilsteampassnet#4440)
Browse files Browse the repository at this point in the history
Contributing fix discussed here: nilsteampassnet#4440

Allows for the creation of oAuth based users from m365 tenants
  • Loading branch information
jhumphries authored Nov 14, 2024
1 parent fae22cd commit b9b71ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/identify.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -2687,4 +2687,4 @@ function identifyDoAzureChecks(
'mfaData' => ['message' => $lang->get('wrong_mfa_code')],
'mfaQRCodeInfos' => false,
];
}
}

0 comments on commit b9b71ee

Please sign in to comment.