Skip to content
Open
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
4 changes: 4 additions & 0 deletions lib/User/Backend.php
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ public function getCurrentUserId(): string {
$this->eventDispatcher->dispatchTyped($validationEvent);
$oidcProviderUserId = $validationEvent->getUserId();
if ($oidcProviderUserId !== null) {
$this->session->set('app_api', true);
return $oidcProviderUserId;
} else {
$this->logger->debug('[NextcloudOidcProviderValidator] The bearer token validation has failed');
Expand Down Expand Up @@ -306,10 +307,12 @@ public function getCurrentUserId(): string {
}

$this->session->set('last-password-confirm', strtotime('+4 year', time()));
$this->session->set('app_api', true);
return $userId;
} elseif ($this->userExists($tokenUserId)) {
$this->checkFirstLogin($tokenUserId);
$this->session->set('last-password-confirm', strtotime('+4 year', time()));
$this->session->set('app_api', true);
return $tokenUserId;
} else {
// check if the user exists locally
Expand All @@ -331,6 +334,7 @@ public function getCurrentUserId(): string {
}
$this->checkFirstLogin($tokenUserId);
$this->session->set('last-password-confirm', strtotime('+4 year', time()));
$this->session->set('app_api', true);
return $tokenUserId;
}
}
Expand Down