#524 Two Factor - Authenticator App - now offers the end-user a "Can't scan?" fallback

This commit is contained in:
enrico.degaudenzi@connectorly.io
2023-10-06 15:49:31 +01:00
parent 723ae81d11
commit bbd206ac1c
5 changed files with 11 additions and 1 deletions

View File

@ -473,7 +473,7 @@ class SettingsController extends Controller
switch ($choice) {
case 'google-authenticator':
$uri = $this->make(TwoFactorQrCodeUriGeneratorService::class, [$user])->run();
return $this->renderAjax('two-factor', ['id' => $id, 'uri' => $uri]);
return $this->renderAjax('two-factor', ['id' => $id, 'uri' => $uri, 'user' => $user]);
case 'email':
$emailCode = $this->make(TwoFactorEmailCodeGeneratorService::class, [$user])->run();
return $this->renderAjax('two-factor-email', ['id' => $id, 'code' => $emailCode]);