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
053c76d51a
commit
38f82f3175
2 changed files with 3 additions and 1 deletions
|
@ -1328,7 +1328,7 @@ class ConfigControllerTest extends WallabagTestCase
|
||||||
->getRepository(User::class)
|
->getRepository(User::class)
|
||||||
->findOneByUsername('admin');
|
->findOneByUsername('admin');
|
||||||
|
|
||||||
$this->assertEmpty($user->getGoogleAuthenticatorSecret());
|
$this->assertNull($user->getGoogleAuthenticatorSecret());
|
||||||
$this->assertEmpty($user->getBackupCodes());
|
$this->assertEmpty($user->getBackupCodes());
|
||||||
$this->assertFalse($user->isGoogleTwoFactor());
|
$this->assertFalse($user->isGoogleTwoFactor());
|
||||||
}
|
}
|
||||||
|
|
|
@ -66,6 +66,7 @@ class SecurityControllerTest extends WallabagTestCase
|
||||||
->getRepository(User::class)
|
->getRepository(User::class)
|
||||||
->findOneByUsername('admin');
|
->findOneByUsername('admin');
|
||||||
$user->setGoogleAuthenticatorSecret('26LDIHYGHNELOQEM');
|
$user->setGoogleAuthenticatorSecret('26LDIHYGHNELOQEM');
|
||||||
|
$user->setGoogleAuthenticator(true);
|
||||||
$em->persist($user);
|
$em->persist($user);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
|
|
||||||
|
@ -78,6 +79,7 @@ class SecurityControllerTest extends WallabagTestCase
|
||||||
->getRepository(User::class)
|
->getRepository(User::class)
|
||||||
->findOneByUsername('admin');
|
->findOneByUsername('admin');
|
||||||
$user->setGoogleAuthenticatorSecret(null);
|
$user->setGoogleAuthenticatorSecret(null);
|
||||||
|
$user->setGoogleAuthenticator(false);
|
||||||
$em->persist($user);
|
$em->persist($user);
|
||||||
$em->flush();
|
$em->flush();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue