Improved external logout handling

This commit is contained in:
the-djmaze 2022-11-04 09:26:58 +01:00
parent f0a3ea1348
commit 0a21485003
3 changed files with 4 additions and 3 deletions

View file

@ -97,7 +97,7 @@ class Application extends App implements IBootstrap
$userSession->listen('\OC\User', 'logout', function($user) {
\OC::$server->getSession()['snappymail-password'] = '';
SnappyMailHelper::loadApp();
\RainLoop\Api::LogoutCurrentLogginedUser();
\RainLoop\Api::Actions()->Logout(true);
});
}
}

View file

@ -431,8 +431,10 @@ trait UserAuth
public function Logout(bool $bMain) : void
{
// Utils::ClearCookie(Utils::SESSION_TOKEN);
Utils::ClearCookie(self::AUTH_ADDITIONAL_TOKEN_KEY);
$bMain && Utils::ClearCookie(self::AUTH_SPEC_TOKEN_KEY);
// TODO: kill SignMe data to prevent automatic login?
}
/**

View file

@ -172,8 +172,7 @@ abstract class Api
public static function LogoutCurrentLogginedUser() : bool
{
// TODO: kill SignMe data to prevent automatic login?
Utils::ClearCookie(Utils::SESSION_TOKEN);
static::Actions()->Logout(true);
return true;
}
}