summaryrefslogtreecommitdiffstats
path: root/vendor/sonata-project/google-authenticator/sample/tmpl/ask-for-otp.php
blob: f3e06d477e22f323426f97ae46c67be8b7a2efba (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

<h1>please otp</h1>
<p>
<form method="post" action="./">
<?php if ($debug) {
    ?>
    <br/>
    (Set $debug in index.php to false, if you don't want to have the OTP prefilled (for real life application, for example ;))<br/>
<?php
}
?>

otp: <input name="otp"
value="<?php
if ($debug) {
    $g = new GoogleAuthenticator();
    echo $g->getCode($user->getSecret());
}
?>"/><br/>
<input type="checkbox" name="remember" id="remember" /><label for="remember"> Remember verification for this computer for 1 day.</label> <br/>
<input type="submit"/>

</form>