File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1673,11 +1673,13 @@ public function isPasswordlessEnabled(): bool
16731673
16741674 public function enablePasswordless (): void
16751675 {
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 " ));
1676+ $ app_type = $ this ->getApplicationType ();
1677+ if (!in_array ($ this ->getApplicationType (), self ::$ allowed_otp_client_types )) {
1678+ throw new ValidationException ("This application type ( $ app_type) does not allow passwordless. " );
16801679 }
1680+ $ this ->otp_enabled = true ;
1681+ $ this ->otp_length = intval (Config::get ("otp.length " ));
1682+ $ this ->otp_lifetime = intval (Config::get ("otp.lifetime " ));
16811683 }
16821684
16831685 public function disablePasswordless (): void
You can’t perform that action at this time.
0 commit comments