1
0
Fork 0
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:
Kevin Decherf 2025-07-20 19:23:28 +02:00
parent 8a72a5ac9d
commit bbbe09544a
2 changed files with 3 additions and 3 deletions

View file

@ -312,7 +312,7 @@ class ConfigController extends AbstractController
$user = $this->getUser();
$user->setGoogleAuthenticatorSecret(null);
$user->setGoogleAuthenticatorSecret('');
$user->setGoogleAuthenticator(false);
$user->setBackupCodes(null);

View file

@ -1292,7 +1292,7 @@ class ConfigControllerTest extends WallabagTestCase
$this->assertGreaterThan(0, \count($user->getBackupCodes()));
// Restore user
$user->setGoogleAuthenticatorSecret(null);
$user->setGoogleAuthenticatorSecret('');
$user->setGoogleAuthenticator(false);
$user->setBackupCodes([]);
$em->persist($user);
@ -1328,7 +1328,7 @@ class ConfigControllerTest extends WallabagTestCase
->getRepository(User::class)
->findOneByUsername('admin');
$this->assertNull($user->getGoogleAuthenticatorSecret());
$this->assertEmpty($user->getGoogleAuthenticatorSecret());
$this->assertEmpty($user->getBackupCodes());
$this->assertFalse($user->isGoogleTwoFactor());
}