diff -u b/src/Controller/OpenIDConnectRedirectController.php b/src/Controller/OpenIDConnectRedirectController.php --- b/src/Controller/OpenIDConnectRedirectController.php +++ b/src/Controller/OpenIDConnectRedirectController.php @@ -349,7 +349,7 @@ * @return \Drupal\openid_connect\Plugin\OpenIDConnectClientInterface|null * The client plugin begin called or NULL if none are available. */ - private function getClient(string $client_name): ?OpenIDConnectClientInterface { + protected function getClient(string $client_name): ?OpenIDConnectClientInterface { $configuration = $this->config('openid_connect.settings.' . $client_name) ->get('settings'); diff -u b/src/OpenIDConnectSession.php b/src/OpenIDConnectSession.php --- b/src/OpenIDConnectSession.php +++ b/src/OpenIDConnectSession.php @@ -64,7 +64,8 @@ // Make sure the uri is not external. if (!$target_link_uri->isExternal()) { // This path is internal. - $path = $target_link_uri->toString(); + $target_path = $target_link_uri->toString(TRUE); + $path = $target_path->getGeneratedUrl(); $query = $target_link_uri->getRouteParameters(); } }