From f8dad4879fd0e7247fbc5d6ceaf9c26b53a6b928 Mon Sep 17 00:00:00 2001 From: Janne Suominen Date: Wed, 11 Jan 2023 09:06:41 +0200 Subject: [PATCH] Use parentEntityId for url --- src/EventSubscriber/TunnistamoRedirectUrlSubscriber.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) {