diff --git a/src/EventSubscriber/TunnistamoRedirectUrlSubscriber.php b/src/EventSubscriber/TunnistamoRedirectUrlSubscriber.php index 59745a3..ac4e91b 100644 --- a/src/EventSubscriber/TunnistamoRedirectUrlSubscriber.php +++ b/src/EventSubscriber/TunnistamoRedirectUrlSubscriber.php @@ -47,8 +47,9 @@ public function onRedirectUrlEvent(RedirectUrlEvent $event) : void { // defined. if (!$returnUrl && $activePrefix = $this->prefix->getPrefix('fi')) { $uriOptions['language'] = $this->languageManager->getLanguage('fi'); + // Tunnistamo return URL is always configured to use /fi prefix. - $returnUrl = sprintf('/fi/%s/openid-connect/%s', $activePrefix, $event->getClient()->getPluginId()); + $returnUrl = sprintf('/fi/%s/openid-connect/%s', $activePrefix, $event->getClient()->getParentEntityId()); } if (!$returnUrl) {