aboutsummaryrefslogtreecommitdiffstats
path: root/core/templates
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@users.noreply.github.com>2021-12-30 08:14:23 +0100
committerGitHub <noreply@github.com>2021-12-30 08:14:23 +0100
commitbfaeb6ae64b01d591c8122ccb8ba4f7af98652c7 (patch)
treee424b97303d34c95befc9bc2a8d43bb590cf3b02 /core/templates
parentbf6388ef2d1b13829ef85dc83d6ccbd5e43759bb (diff)
parentcdda25acb49e50e5989743c0251b394dbbebcaa5 (diff)
downloadnextcloud-server-bfaeb6ae64b01d591c8122ccb8ba4f7af98652c7.tar.gz
nextcloud-server-bfaeb6ae64b01d591c8122ccb8ba4f7af98652c7.zip
Merge pull request #29531 from nextcloud/bugfix/noid/flow-auth-v2-apptoken
Diffstat (limited to 'core/templates')
-rw-r--r--core/templates/loginflow/authpicker.php8
-rw-r--r--core/templates/loginflowv2/authpicker.php18
2 files changed, 22 insertions, 4 deletions
diff --git a/core/templates/loginflow/authpicker.php b/core/templates/loginflow/authpicker.php
index 128429cb0b3..d8ef2998d13 100644
--- a/core/templates/loginflow/authpicker.php
+++ b/core/templates/loginflow/authpicker.php
@@ -64,8 +64,8 @@ $urlGenerator = $_['urlGenerator'];
<input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>">
<input id="submit-app-token-login" type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Grant access')) ?>">
</form>
-</div>
-<?php if (empty($_['oauthState'])): ?>
-<a id="app-token-login" class="warning" href="#"><?php p($l->t('Alternative log in using app token')) ?></a>
-<?php endif; ?>
+ <?php if (empty($_['oauthState'])): ?>
+ <a id="app-token-login" class="apptoken-link" href="#"><?php p($l->t('Alternative log in using app token')) ?></a>
+ <?php endif; ?>
+</div>
diff --git a/core/templates/loginflowv2/authpicker.php b/core/templates/loginflowv2/authpicker.php
index 42eb72aee33..8caa42f2ce8 100644
--- a/core/templates/loginflowv2/authpicker.php
+++ b/core/templates/loginflowv2/authpicker.php
@@ -20,6 +20,7 @@
*/
style('core', 'login/authpicker');
+script('core', 'login/authpicker');
/** @var array $_ */
/** @var \OCP\IURLGenerator $urlGenerator */
@@ -50,4 +51,21 @@ $urlGenerator = $_['urlGenerator'];
</a>
</p>
+ <form action="<?php p($urlGenerator->linkToRouteAbsolute('core.ClientFlowLoginV2.apptokenRedirect')); ?>" method="post" id="app-token-login-field" class="hidden">
+ <p class="grouptop">
+ <input type="text" name="user" id="user" placeholder="<?php p($l->t('Username')) ?>">
+ <label for="user" class="infield"><?php p($l->t('Username')) ?></label>
+ </p>
+ <p class="groupbottom">
+ <input type="password" name="password" id="password" placeholder="<?php p($l->t('App token')) ?>">
+ <label for="password" class="infield"><?php p($l->t('Password')) ?></label>
+ </p>
+ <input type="hidden" name="stateToken" value="<?php p($_['stateToken']) ?>" />
+ <input type="hidden" name="requesttoken" value="<?php p($_['requesttoken']) ?>">
+ <input id="submit-app-token-login" type="submit" class="login primary icon-confirm-white" value="<?php p($l->t('Grant access')) ?>">
+ </form>
+
+ <?php if (empty($_['oauthState'])): ?>
+ <a id="app-token-login" class="apptoken-link" href="#"><?php p($l->t('Alternative log in using app token')) ?></a>
+ <?php endif; ?>
</div>