Skip to content
Merged
Changes from all commits
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
9 changes: 9 additions & 0 deletions lib/Controller/LoginController.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
use OCA\UserOIDC\Service\OIDCService;
use OCA\UserOIDC\Service\ProviderService;
use OCA\UserOIDC\Service\ProvisioningService;
use OCA\UserOIDC\Service\SettingsService;
use OCA\UserOIDC\Service\TokenService;
use OCA\UserOIDC\User\Backend;
use OCA\UserOIDC\Vendor\Firebase\JWT\JWT;
Expand Down Expand Up @@ -70,6 +71,7 @@ public function __construct(
private ProviderService $providerService,
private DiscoveryService $discoveryService,
private LdapService $ldapService,
private SettingsService $settingsService,
private ISecureRandom $random,
private ISession $session,
private HttpClientHelper $clientService,
Expand Down Expand Up @@ -667,6 +669,13 @@ public function singleLogoutService() {
}
} else {
$providerId = $this->session->get(self::PROVIDERID);
// if the provider is not found and we are in SSO mode, just use the one and only provider
if ($providerId === null && !$this->settingsService->getAllowMultipleUserBackEnds()) {
$providers = $this->providerMapper->getProviders();
if (count($providers) === 1) {
$providerId = $providers[0]->getId();
}
}
}
if ($providerId) {
try {
Expand Down
Loading