SyncClient (Windows): reject app password / automatic logout after few minutes

hi

I encounter a similar problem. With desktop client, I was deconnect after 5 minutes.

In file nextcloud/lib/private/User/Session.php, there is a check of token validity each 5 minutes in ligne 676 :

 /**
     * @param IToken $dbToken
     * @param string $token
     * @return boolean
     */

    private function checkTokenCredentials(IToken $dbToken, $token) {
        // Check whether login credentials are still valid and the user was not disabled
        // This check is performed each 5 minutes
        $lastCheck = $dbToken->getLastCheck() ? : 0;
        $now = $this->timeFactory->getTime();
        //if ($lastCheck > ($now - 60 * 5)) {
        //BLODS check de la validité du token, si plus valide coupe la session => passé de 5 min à 8 heures
if ($lastCheck > ($now - 60 * 480)) {
            // Checked performed recently, nothing to do now
            return true;
        }

I change the
if ($lastCheck > ($now - 60 * 5)) {
to
if ($lastCheck > ($now - 60 * 480)) {

then i’m disconnect after 8 hours instead of 5 minutes.

cordialy

1 Like