hanyuu/templates/oauth2/authorise.twig

23 lines
1.2 KiB
Twig

{% extends 'oauth2/master.twig' %}
{% block body %}
<h1><a href="{{ app.website }}" target="_blank">{{ app.name }}</a></h1>
<p>{{ app.summary }}</p>
<p>{% if app.isTrusted %}This is an official application. Things should probably just implicitly authorise if we hit this.{% else %}This is a third-party application.{% endif %}</p>
<p>You are logged in as <a href="{{ auth.user.profile_url }}" target="_blank" style="color: {{ auth.user.colour }}">{{ auth.user.name }}</a>.</p>
{% if auth.guise is defined %}
<p>Are you <a href="{{ auth.guise.profile_url }}" target="_blank" style="color: {{ auth.guise.colour }}">{{ auth.guise.name }}</a> and did you mean to use your own account? <a href="{{ auth.guise.revert_url }}" target="_blank">Click here</a> and reload this page.</p>
{% endif %}
<form method="post" action="/oauth2/authorise">
<input type="hidden" name="code" value="{{ req.code }}">
<input type="hidden" name="approve" value="yes">
<button>Authorise</button>
</form>
<form method="post" action="/oauth2/authorise">
<input type="hidden" name="code" value="{{ req.code }}">
<input type="hidden" name="approve" value="no">
<button>Cancel</button>
</form>
{% endblock %}