Skip to content

Commit c43bcf9

Browse files
committed
:octocat: increase amount of adjacent codes in TOTP mode (10 minutes at the default of a 30 second period)
1 parent a3f0eb8 commit c43bcf9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/AuthenticatorOptionsTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ protected function set_mode(string $mode):void{
164164
*/
165165
protected function set_adjacent(int $adjacent):void{
166166
// limit to a sane amount
167-
if($adjacent < 0 || $adjacent > 10){
167+
if($adjacent < 0 || $adjacent > 20){
168168
throw new InvalidArgumentException('Invalid number of adjacent codes: '.$adjacent);
169169
}
170170

tests/AuthenticatorOptionsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function testSetModeException():void{
8181
}
8282

8383
public function testSetAdjacent():void{
84-
for($adjacent = 0; $adjacent <= 10; $adjacent++){
84+
for($adjacent = 0; $adjacent <= 20; $adjacent++){
8585
$this->options->adjacent = $adjacent;
8686
$this::assertSame($adjacent, $this->options->adjacent);
8787
}

0 commit comments

Comments
 (0)