Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Remove 'two_factor_auth_configuring' after verify success
Signed-off-by: Michiel de Jong <[email protected]>
  • Loading branch information
michielbdejong committed Nov 22, 2023
commit d7cb86a7e2392c64e54fd918311586996bc01e77
1 change: 1 addition & 0 deletions lib/private/Authentication/TwoFactorAuth/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ public function verifyChallenge(string $providerId, IUser $user, string $challen
$this->session->remove(self::SESSION_UID_KEY);
$this->session->remove(self::REMEMBER_LOGIN);
$this->session->set(self::SESSION_UID_DONE, $user->getUID());
$this->session->remove(self::SESSION_UID_CONFIGURING);

// Clear token from db
$sessionId = $this->session->getId();
Expand Down
5 changes: 3 additions & 2 deletions tests/lib/Authentication/TwoFactorAuth/ManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,11 +369,12 @@ public function testVerifyChallenge() {
->method('get')
->with('two_factor_remember_login')
->willReturn(false);
$this->session->expects($this->exactly(2))
$this->session->expects($this->exactly(3))
->method('remove')
->withConsecutive(
['two_factor_auth_uid'],
['two_factor_remember_login']
['two_factor_remember_login'],
['two_factor_auth_configuring']
);
$this->session->expects($this->once())
->method('set')
Expand Down