hanyuu/templates/oauth2/verify.twig
flashwave 5fa03dd551 Removed mentions of "device" from the UI and URLs.
While the intention of the extension specification to OAuth2 for device codes is indeed intended for handling authorisation on devices where the user cannot use any input method on the device,
 it's also very useful for when we want to authorise older devices where there are other difficulties, such as outdated or intentionally omitted root certificates making it only possible to use
 plain HTTP, or just other sorts of applications where having to make a web UI just for receiving the authorisation code to complete the token request would be a bother,
 for me such a case would be bots like Satori.
It essentially just replaces three-legged authorisation from OAuth 1.0a but without the needlessly complex annoying aspects of OAuth 1.0a.

Beyond that I'm also just sick of entering my ridiculously long, randomly generated password letter by letter on the inaccurate touch screen of the Nintendo 3DS.
2024-07-30 13:08:22 +00:00

58 lines
2.4 KiB
Twig

{% extends 'oauth2/master.twig' %}
{% set body_header_class = 'devicehead' %}
{% set body_header_text = 'Code authorisation' %}
{% set body_title = 'Authorisation Request' %}
{% block body_content %}
<div class="js-loading"></div>
<form class="js-verify-code hidden">
<div class="oauth2-authorise-requesting">
<p>A third-party application that cannot display websites on its own is requesting permission to access your account.</p>
<p>Enter the code displayed on the device or application in the box below to continue authorisation.</p>
</div>
<div class="oauth2-device-form">
<input type="text" class="oauth2-device-code js-device-code" name="code" placeholder="XXX-XXX-XXX" autofocus>
</div>
<div class="oauth2-authorise-buttons">
<button class="oauth2-authorise-button">Next</button>
</div>
</form>
<form class="js-verify-authorise hidden">
<div class="oauth2-authorise-requesting">
<p>A third-party application is requesting permission to access your account.</p>
</div>
<div class="js-verify-authorise-info"></div>
<div class="js-verify-authorise-scope"></div>
<div class="oauth2-authorise-buttons">
<button name="approve" value="yes" class="oauth2-authorise-button oauth2-authorise-button-accept">Authorise</button>
<button name="approve" value="no" class="oauth2-authorise-button oauth2-authorise-button-deny">Cancel</button>
</div>
</form>
<div class="js-verify-approved hidden">
<div class="oauth2-approval">
<div class="oauth2-approval-icon oauth2-approval-icon-approved"></div>
<div class="oauth2-approval-header">Approved!</div>
<div class="oauth2-approval-text">
<p>You have approved the authorisation request. You should now be signed in on the target device or application.</p>
</div>
</div>
</div>
<div class="js-verify-denied hidden">
<div class="oauth2-approval">
<div class="oauth2-approval-icon oauth2-approval-icon-denied"></div>
<div class="oauth2-approval-header">Denied!</div>
<div class="oauth2-approval-text">
<p>You have denied the authorisation request. Please return to the target device or application and follow displayed instructions.</p>
</div>
</div>
</div>
{% endblock %}