~fkooman/vpn-user-portal

ref: 2.3.10 vpn-user-portal/views/twoFactorTotp.php -rw-r--r-- 1.4 KiB
e0bd9cc0François Kooman prepare for release 1 year, 15 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php $this->layout('base', ['pageTitle' => $this->t('Two-factor Authentication')]); ?>
<?php $this->start('content'); ?>
    <div class="auth">
        <p>
            <?=$this->t('Please provide your TOTP.'); ?>
        </p>

        <?php if ($_two_factor_auth_invalid): ?>
            <p class="error">
                <?=$this->t('The TOTP you provided is incorrect.'); ?> (<?=$this->e($_two_factor_auth_error_msg); ?>)
            </p>
        <?php endif; ?>

        <form class="frm" method="post" action="<?=$this->e($requestRoot); ?>_two_factor/auth/verify/totp">
            <fieldset>
                    <label for="totpKey"><?=$this->t('OTP'); ?></label>
                    <input type="text" inputmode="numeric" placeholder="<?=$this->t('OTP'); ?>" id="totpKey" name="_two_factor_auth_totp_key" autocomplete="off" maxlength="6" required pattern="[0-9]{6}" autofocus>
            </fieldset>
            <fieldset>
                <input type="hidden" name="_two_factor_auth_redirect_to" value="<?=$this->e($_two_factor_auth_redirect_to); ?>">
                <button type="submit"><?=$this->t('Verify'); ?></button>
            </fieldset>
        </form>

        <p>
            <?=$this->t('Contact support if you lost your TOTP.'); ?>
            <?=$this->t('Your ID is <code>%_two_factor_user_id%</code>.'); ?>
        </p>
    </div>
<?php $this->stop('content'); ?>