ask-for-otp.php 555 B

1234567891011121314151617181920212223
  1. <h1>please otp</h1>
  2. <p>
  3. <form method="post" action="./">
  4. <?php if ($debug) {
  5. ?>
  6. <br/>
  7. (Set $debug in index.php to false, if you don't want to have the OTP prefilled (for real life application, for example ;))<br/>
  8. <?php
  9. }
  10. ?>
  11. otp: <input name="otp"
  12. value="<?php
  13. if ($debug) {
  14. $g = new GoogleAuthenticator();
  15. echo $g->getCode($user->getSecret());
  16. }
  17. ?>"/><br/>
  18. <input type="checkbox" name="remember" id="remember" /><label for="remember"> Remember verification for this computer for 1 day.</label> <br/>
  19. <input type="submit"/>
  20. </form>