File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 4343#[ORM \Cache('NONSTRICT_READ_WRITE ' )] // Class Client
4444class Client extends BaseEntity implements IClient
4545{
46+ private static array $ allowed_otp_client_types = [
47+ IClient::ApplicationType_JS_Client,
48+ IClient::ApplicationType_Native,
49+ IClient::ApplicationType_Web_App
50+ ];
51+
4652 /**
4753 * @var string
4854 */
@@ -1667,9 +1673,11 @@ public function isPasswordlessEnabled(): bool
16671673
16681674 public function enablePasswordless (): void
16691675 {
1670- $ this ->otp_enabled = true ;
1671- $ this ->otp_length = intval (Config::get ("otp.length " ));
1672- $ this ->otp_lifetime = intval (Config::get ("otp.lifetime " ));
1676+ if (in_array ($ this ->getApplicationType (), self ::$ allowed_otp_client_types )) {
1677+ $ this ->otp_enabled = true ;
1678+ $ this ->otp_length = intval (Config::get ("otp.length " ));
1679+ $ this ->otp_lifetime = intval (Config::get ("otp.lifetime " ));
1680+ }
16731681 }
16741682
16751683 public function disablePasswordless (): void
You can’t perform that action at this time.
0 commit comments