mirror of
https://github.com/elyby/accounts.git
synced 2026-10-20 20:58:03 +05:30
Теперь на этапе включения TOTP код может истечь в течение 2 периодов
This commit is contained in:
1 parent
dab0ab4cba
commit
47b6761f78
3 files changed
+13
-2
No files matched your search
@@ -58,4 +58,15 @@ class EnableTwoFactorAuthCest {
|
||||
]);
|
||||
}
|
||||
|
||||
public function testSuccessEnableWithNotSoExpiredCode(FunctionalTester $I) {
|
||||
$accountId = $I->amAuthenticated('AccountWithOtpSecret');
|
||||
$totp = TOTP::create('AAAA');
|
||||
$this->route->enableTwoFactorAuth($accountId, $totp->at(time() - 35), 'password_0');
|
||||
$I->canSeeResponseCodeIs(200);
|
||||
$I->canSeeResponseIsJson();
|
||||
$I->canSeeResponseContainsJson([
|
||||
'success' => true,
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user