Skip to content

Commit

Permalink
System: Access: Users - add issuer and logo to OTP link, for #7126
Browse files Browse the repository at this point in the history
  • Loading branch information
AdSchellevis authored and fichtner committed Mar 12, 2024
1 parent 1e51c5b commit 8437f2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/www/system_usermanager.php
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,8 @@ class="btn btn-default btn-xs" data-toggle="tooltip" title="<?=gettext("export c
$otp_url = "otpauth://totp/";
$otp_url .= $pconfig['usernamefld']."@".htmlspecialchars($config['system']['hostname'])."?secret=";
$otp_url .= $pconfig['otp_seed'];
$otp_url .= "&issuer=OPNsense";
$otp_url .= "&image=https://docs.opnsense.org/_static/favicon.png";
?>
<tr>
<td><a id="help_for_otp_code" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?= gettext('OTP QR code') ?></td>
Expand Down
2 changes: 2 additions & 0 deletions src/www/system_usermanager_passwordmg.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
$otp_url = "otpauth://totp/";
$otp_url .= $username."@".htmlspecialchars($config['system']['hostname'])."?secret=";
$otp_url .= $new_seed;
$otp_url .= "&issuer=OPNsense";
$otp_url .= "&image=https://docs.opnsense.org/_static/favicon.png";
echo json_encode([
"otp_seed" => $new_seed ,
"otp_seed_url" => $otp_url,
Expand Down

0 comments on commit 8437f2f

Please sign in to comment.