[Web] fixed totp var in twig
Signed-off-by: Kristian Feldsam <feldsam@gmail.com>master
parent
b682ec43ea
commit
974100400b
|
@ -35,6 +35,7 @@ $globalVariables = [
|
||||||
'pagination_size' => $PAGINATION_SIZE,
|
'pagination_size' => $PAGINATION_SIZE,
|
||||||
'log_pagination_size' => $LOG_PAGINATION_SIZE,
|
'log_pagination_size' => $LOG_PAGINATION_SIZE,
|
||||||
'alerts' => $alerts,
|
'alerts' => $alerts,
|
||||||
|
'totp_secret' => $tfa->createSecret(),
|
||||||
];
|
];
|
||||||
|
|
||||||
foreach ($globalVariables as $globalVariableName => $globalVariableValue) {
|
foreach ($globalVariables as $globalVariableName => $globalVariableValue) {
|
||||||
|
|
|
@ -89,17 +89,14 @@
|
||||||
<input type="password" class="form-control" name="confirm_password" placeholder="{{ lang.user.password_now }}" autocomplete="off" required>
|
<input type="password" class="form-control" name="confirm_password" placeholder="{{ lang.user.password_now }}" autocomplete="off" required>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
<?php
|
<input type="hidden" value="{{ totp_secret }}" name="totp_secret">
|
||||||
$totp_secret = $tfa->createSecret();
|
|
||||||
?>
|
|
||||||
<input type="hidden" value="<?=$totp_secret;?>" name="totp_secret">
|
|
||||||
<input type="hidden" name="tfa_method" value="totp">
|
<input type="hidden" name="tfa_method" value="totp">
|
||||||
<ol>
|
<ol>
|
||||||
<li>
|
<li>
|
||||||
<p>{{ lang.tfa.scan_qr_code }}</p>
|
<p>{{ lang.tfa.scan_qr_code }}</p>
|
||||||
<img id="tfa-qr-img" data-totp-secret="<?=$totp_secret;?>" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=">
|
<img id="tfa-qr-img" data-totp-secret="{{ totp_secret }}" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=">
|
||||||
<p class="help-block">{{ lang.tfa.enter_qr_code }}:<br />
|
<p class="help-block">{{ lang.tfa.enter_qr_code }}:<br />
|
||||||
<code><?=$totp_secret;?></code>
|
<code>{{ totp_secret }}</code>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
|
|
Loading…
Reference in New Issue