Browse Source

setup a 15' expiration delay to captcha challenge

olinox14 1 year ago
parent
commit
1072717278
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/State/Provider/ChallengeProvider.php

+ 2 - 1
src/State/Provider/ChallengeProvider.php

@@ -29,7 +29,8 @@ class ChallengeProvider implements ProviderInterface
 
         $options = new ChallengeOptions([
             'hmacKey'   => $this->hmacKey,
-            'maxNumber' => 100000
+            'maxNumber' => 100000,
+            'expires' => (new \DateTime())->modify('+15 minute')
         ]);
 
         return Altcha::createChallenge($options);