diff --git a/core/Controller/ClientFlowLoginV2Controller.php b/core/Controller/ClientFlowLoginV2Controller.php
index 76c8ed2921a9f..e6e1c282d2b6b 100644
--- a/core/Controller/ClientFlowLoginV2Controller.php
+++ b/core/Controller/ClientFlowLoginV2Controller.php
@@ -84,7 +84,7 @@ public function poll(string $token): JSONResponse {
#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]
#[UseSession]
#[FrontpageRoute(verb: 'GET', url: '/login/v2/flow/{token}')]
- 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();
}
@@ -92,7 +92,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])
);
}
@@ -101,7 +101,7 @@ public function landing(string $token, $user = ''): Response {
#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]
#[UseSession]
#[FrontpageRoute(verb: 'GET', url: '/login/v2/flow')]
- public function showAuthPickerPage($user = ''): StandaloneTemplateResponse {
+ public function showAuthPickerPage(string $user = '', int $direct = 0): StandaloneTemplateResponse {
try {
$flow = $this->getFlowByLoginToken();
} catch (LoginFlowV2NotFoundException $e) {
@@ -123,6 +123,7 @@ public function showAuthPickerPage($user = ''): StandaloneTemplateResponse {
'urlGenerator' => $this->urlGenerator,
'stateToken' => $stateToken,
'user' => $user,
+ 'direct' => $direct,
],
'guest'
);
@@ -136,7 +137,7 @@ public function showAuthPickerPage($user = ''): StandaloneTemplateResponse {
#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]
#[UseSession]
#[FrontpageRoute(verb: 'GET', url: '/login/v2/grant')]
- public function grantPage(?string $stateToken): StandaloneTemplateResponse {
+ public function grantPage(?string $stateToken, int $direct = 0): StandaloneTemplateResponse {
if ($stateToken === null) {
return $this->stateTokenMissingResponse();
}
@@ -163,6 +164,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 14f5a6fe3d03b..9c77409ed058c 100644
--- a/core/templates/loginflowv2/authpicker.php
+++ b/core/templates/loginflowv2/authpicker.php
@@ -31,7 +31,7 @@
-
diff --git a/core/templates/loginflowv2/grant.php b/core/templates/loginflowv2/grant.php index 69599810ce98e..2fec49942d553 100644 --- a/core/templates/loginflowv2/grant.php +++ b/core/templates/loginflowv2/grant.php @@ -33,6 +33,9 @@