diff --git a/lib/private/User/Session.php b/lib/private/User/Session.php index a411326c93f31..77413f4d4e122 100644 --- a/lib/private/User/Session.php +++ b/lib/private/User/Session.php @@ -885,6 +885,9 @@ public function tryTokenLogin(IRequest $request) { $this->session->set('app_password', $token); } + // Set the last-password-confirm session to make the sudo mode work + $this->session->set('last-password-confirm', $this->timeFactory->getTime()); + return true; }