diff --git a/core/Controller/ClientFlowLoginV2Controller.php b/core/Controller/ClientFlowLoginV2Controller.php index ef16cfbd04bf5..fa8a268d1a8d3 100644 --- a/core/Controller/ClientFlowLoginV2Controller.php +++ b/core/Controller/ClientFlowLoginV2Controller.php @@ -100,7 +100,7 @@ public function poll(string $token): JSONResponse { * @PublicPage */ #[UseSession] - public function landing(string $token, $user = ''): Response { + public function landing(string $token, $user = '', int $direct = 0): Response { if (!$this->loginFlowV2Service->startLoginFlow($token)) { return $this->loginTokenForbiddenResponse(); } @@ -108,7 +108,7 @@ public function landing(string $token, $user = ''): Response { $this->session->set(self::TOKEN_NAME, $token); return new RedirectResponse( - $this->urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.showAuthPickerPage', ['user' => $user]) + $this->urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.showAuthPickerPage', ['user' => $user, 'direct' => $direct]) ); } @@ -117,7 +117,7 @@ public function landing(string $token, $user = ''): Response { * @PublicPage */ #[UseSession] - public function showAuthPickerPage($user = ''): StandaloneTemplateResponse { + public function showAuthPickerPage(string $user = '', int $direct = 0): StandaloneTemplateResponse { try { $flow = $this->getFlowByLoginToken(); } catch (LoginFlowV2NotFoundException $e) { @@ -139,6 +139,7 @@ public function showAuthPickerPage($user = ''): StandaloneTemplateResponse { 'urlGenerator' => $this->urlGenerator, 'stateToken' => $stateToken, 'user' => $user, + 'direct' => $direct, ], 'guest' ); @@ -150,7 +151,7 @@ public function showAuthPickerPage($user = ''): StandaloneTemplateResponse { * @NoSameSiteCookieRequired */ #[UseSession] - public function grantPage(?string $stateToken): StandaloneTemplateResponse { + public function grantPage(?string $stateToken, int $direct = 0): StandaloneTemplateResponse { if ($stateToken === null) { return $this->stateTokenMissingResponse(); } @@ -177,6 +178,7 @@ public function grantPage(?string $stateToken): StandaloneTemplateResponse { 'instanceName' => $this->defaults->getName(), 'urlGenerator' => $this->urlGenerator, 'stateToken' => $stateToken, + 'direct' => $direct, ], 'guest' ); diff --git a/core/templates/loginflowv2/authpicker.php b/core/templates/loginflowv2/authpicker.php index 0e18cc99ce15f..a3cb4be7db3a9 100644 --- a/core/templates/loginflowv2/authpicker.php +++ b/core/templates/loginflowv2/authpicker.php @@ -46,7 +46,7 @@
+

diff --git a/core/templates/loginflowv2/grant.php b/core/templates/loginflowv2/grant.php index 567c3b4e7760e..599e612010bf6 100644 --- a/core/templates/loginflowv2/grant.php +++ b/core/templates/loginflowv2/grant.php @@ -48,6 +48,9 @@
+ + +