Skip to content

Commit

Permalink
Fix showing QR codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Baspa committed Aug 16, 2024
1 parent aa30577 commit b8ca334
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Pages/TwoFactor.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,14 @@ public function enableAction(): Action
$formData['two_factor_type'] = TwoFactorType::tryFrom($this->twoFactorData['option']);
}

if ($formData['two_factor_type'] === TwoFactorType::email) {
$this->showQrCode = false;
} else {
$this->showQrCode = true;
}

if (count($formData) > 0) {

Check failure on line 130 in src/Pages/TwoFactor.php

View workflow job for this annotation

GitHub Actions / phpstan

Comparison operation ">" between int<1, 2> and 0 is always true.
auth()->user()->update($formData);
$this->showQrCode = true;
}

$this->enableTwoFactorAuthentication(app(EnableTwoFactorAuthentication::class));
Expand Down

0 comments on commit b8ca334

Please sign in to comment.