diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-03-29 18:21:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-29 18:21:40 +0200 |
commit | 576e4e8f2a0aebf31d38d59cb7d9c9839e8e253b (patch) | |
tree | eae7870a33d16d486b4535d279565288e3cdc02f /core/templates | |
parent | 9191ca43cebe7889360cbe65f357719fc41f937d (diff) | |
parent | 80388663afa718a884e63de653e0cba545c7403f (diff) | |
download | nextcloud-server-576e4e8f2a0aebf31d38d59cb7d9c9839e8e253b.tar.gz nextcloud-server-576e4e8f2a0aebf31d38d59cb7d9c9839e8e253b.zip |
Merge pull request #31592 from nextcloud/fix/direct-arg-flow-v2
Add direct arg to login flow
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 d8ef2998d13..a7d4faa67bf 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'], 'user' => $_['user']])) ?>"> + <a href="<?php p($urlGenerator->linkToRoute('core.ClientFlowLogin.grantPage', ['stateToken' => $_['stateToken'], 'clientIdentifier' => $_['clientIdentifier'], 'oauthState' => $_['oauthState'], 'user' => $_['user'], '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> 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> |