Skip to content

Commit

Permalink
Use hostname as 2fa barcode identifier.
Browse files Browse the repository at this point in the history
  • Loading branch information
ScIT-Raphael committed Mar 11, 2019
1 parent 9445295 commit 15a11a9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/inc/2fa/secret.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
$tfa = new TwoFactorAuth('Hestia Control Panel');

$secret = $tfa->createSecret(160); // Though the default is an 80 bits secret (for backwards compatibility reasons) we recommend creating 160+ bits secrets (see RFC 4226 - Algorithm Requirements)
$qrcode = $tfa->getQRCodeImageAsDataUri('Hestia Control Panel', $secret);
$qrcode = $tfa->getQRCodeImageAsDataUri(gethostname(), $secret);

echo $secret . "-" . $qrcode;

0 comments on commit 15a11a9

Please sign in to comment.