mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
fixup! Add a two-step setup of OTP
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
This commit is contained in:
parent
8a72a5ac9d
commit
bbbe09544a
2 changed files with 3 additions and 3 deletions
|
@ -312,7 +312,7 @@ class ConfigController extends AbstractController
|
||||||
|
|
||||||
$user = $this->getUser();
|
$user = $this->getUser();
|
||||||
|
|
||||||
$user->setGoogleAuthenticatorSecret(null);
|
$user->setGoogleAuthenticatorSecret('');
|
||||||
$user->setGoogleAuthenticator(false);
|
$user->setGoogleAuthenticator(false);
|
||||||
$user->setBackupCodes(null);
|
$user->setBackupCodes(null);
|
||||||
|
|
||||||
|
|
|
@ -1292,7 +1292,7 @@ class ConfigControllerTest extends WallabagTestCase
|
||||||
$this->assertGreaterThan(0, \count($user->getBackupCodes()));
|
$this->assertGreaterThan(0, \count($user->getBackupCodes()));
|
||||||
|
|
||||||
// Restore user
|
// Restore user
|
||||||
$user->setGoogleAuthenticatorSecret(null);
|
$user->setGoogleAuthenticatorSecret('');
|
||||||
$user->setGoogleAuthenticator(false);
|
$user->setGoogleAuthenticator(false);
|
||||||
$user->setBackupCodes([]);
|
$user->setBackupCodes([]);
|
||||||
$em->persist($user);
|
$em->persist($user);
|
||||||
|
@ -1328,7 +1328,7 @@ class ConfigControllerTest extends WallabagTestCase
|
||||||
->getRepository(User::class)
|
->getRepository(User::class)
|
||||||
->findOneByUsername('admin');
|
->findOneByUsername('admin');
|
||||||
|
|
||||||
$this->assertNull($user->getGoogleAuthenticatorSecret());
|
$this->assertEmpty($user->getGoogleAuthenticatorSecret());
|
||||||
$this->assertEmpty($user->getBackupCodes());
|
$this->assertEmpty($user->getBackupCodes());
|
||||||
$this->assertFalse($user->isGoogleTwoFactor());
|
$this->assertFalse($user->isGoogleTwoFactor());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue