diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-01-25 19:47:58 +0300 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-04-14 14:02:29 +0300 |
commit | b321a431aa60e228cb54003e4aeaac25bded2d3a (patch) | |
tree | 367bba341dd3b3669e6c309443f90f0e7e6e5e34 /core/templates | |
parent | b4847fc5811fe77a75b4faee897fff897ea75a8c (diff) |
Add direct arg to login flow
Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Co-Authored-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'core/templates')
-rw-r--r-- | core/templates/loginflow/authpicker.php | 5 | ||||
-rw-r--r-- | core/templates/loginflow/grant.php | 15 |
2 files changed, 13 insertions, 7 deletions
diff --git a/core/templates/loginflow/authpicker.php b/core/templates/loginflow/authpicker.php index 02b4b9cc003..4c4c8fd6d53 100644 --- a/core/templates/loginflow/authpicker.php +++ b/core/templates/loginflow/authpicker.php @@ -46,7 +46,7 @@ $urlGenerator = $_['urlGenerator']; <br/> <p id="redirect-link"> - <a href="<?php p($urlGenerator->linkToRoute('core.ClientFlowLogin.grantPage', ['stateToken' => $_['stateToken'], 'clientIdentifier' => $_['clientIdentifier'], 'oauthState' => $_['oauthState']])) ?>"> + <a href="<?php p($urlGenerator->linkToRoute('core.ClientFlowLogin.grantPage', ['stateToken' => $_['stateToken'], 'clientIdentifier' => $_['clientIdentifier'], 'oauthState' => $_['oauthState'], 'direct' => $_['direct']])) ?>"> <input type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Log in')) ?>"> </a> </p> @@ -62,6 +62,9 @@ $urlGenerator = $_['urlGenerator']; </p> <input type="hidden" name="stateToken" value="<?php p($_['stateToken']) ?>" /> <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>"> + <?php if ($_['direct'] !== 0) { ?> + <input type="hidden" name="direct" value="<?php p($_['direct']) ?>"> + <?php } ?> <input id="submit-app-token-login" type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Grant access')) ?>"> </form> </div> diff --git a/core/templates/loginflow/grant.php b/core/templates/loginflow/grant.php index 0f1b9235a89..c537c47ea64 100644 --- a/core/templates/loginflow/grant.php +++ b/core/templates/loginflow/grant.php @@ -39,14 +39,17 @@ $urlGenerator = $_['urlGenerator']; <br/> <p id="redirect-link"> - <form method="POST" action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLogin.generateAppPassword')) ?>"> - <input type="hidden" name="clientIdentifier" value="<?php p($_['clientIdentifier']) ?>" /> - <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" /> - <input type="hidden" name="stateToken" value="<?php p($_['stateToken']) ?>" /> - <input type="hidden" name="oauthState" value="<?php p($_['oauthState']) ?>" /> + <form method="POST" action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLogin.generateAppPassword')) ?>"> + <input type="hidden" name="clientIdentifier" value="<?php p($_['clientIdentifier']) ?>" /> + <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>" /> + <input type="hidden" name="stateToken" value="<?php p($_['stateToken']) ?>" /> + <input type="hidden" name="oauthState" value="<?php p($_['oauthState']) ?>" /> + <?php if (p($_['direct'])) { ?> + <input type="hidden" name="direct" value="1" /> + <?php } ?> <div id="submit-wrapper"> <input type="submit" class="login primary icon-confirm-white" title="" value="<?php p($l->t('Grant access')); ?>" /> - </div> + </div> </form> </p> </div> |