mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-09 00:24:27 +02:00
Added support for trusted browser during authentication
This commit is contained in:
parent
72bb3bce34
commit
50f97e977a
4 changed files with 54 additions and 2 deletions
|
@ -26,6 +26,7 @@ use Friendica\Core\Hook;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\DI;
|
||||
use Friendica\Model\Profile;
|
||||
use Friendica\Security\TwoFactor;
|
||||
|
||||
/**
|
||||
* Logout module
|
||||
|
@ -44,6 +45,13 @@ class Logout extends BaseModule
|
|||
}
|
||||
|
||||
Hook::callAll("logging_out");
|
||||
|
||||
// Remove this trusted browser as it won't be able to be used ever again after the cookie is cleared
|
||||
if (DI::cookie()->get('trusted')) {
|
||||
$trustedBrowserRepository = new TwoFactor\Repository\TrustedBrowser(DI::dba(), DI::logger());
|
||||
$trustedBrowserRepository->removeForUser(local_user(), DI::cookie()->get('trusted'));
|
||||
}
|
||||
|
||||
DI::cookie()->clear();
|
||||
DI::session()->clear();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue