{% extends "meta.html" %}
{% block title %}
<title>Personal access token - {{cfg("sr.ht", "site-name")}} meta</title>
{% endblock %}
{% block content %}
<div class="row">
<form class="col-md-12" method="POST" action="/oauth/personal-token">
{{csrf_token()}}
<h3>Personal Access Token</h3>
{% if token %}
<dl>
<dt>Personal Access Token</dt>
<dd>{{token}}</dt>
</dl>
<p>
Your access token <strong>will never be shown to you again</strong>. Keep
this secret.
</p>
<a href="/oauth" class="btn btn-primary">Continue {{icon('caret-right')}}</a>
{% else %}
<p>
This will generate a valid OAuth token with complete access to your
{{cfg("sr.ht", "site-name")}} account, all {{cfg("sr.ht", "site-name")}}
services, and all third party accounts that use
{{cfg("sr.ht", "site-name")}} for authentication.
It will expire in one year, or when you manually revoke it.
</p>
<div class="form-group">
<label for="comment">Comment</label>
<input
type="text"
class="form-control {{valid.cls("comment")}}"
id="comment"
name="comment"
value="{{comment or ""}}"
aria-describedby="comment-help" />
<small id="comment-help" class="text-muted">
Arbitrary comment for personal reference only
</small>
{{valid.summary("comment")}}
</div>
<button
type="submit"
name="accept"
class="btn btn-danger"
>Proceed and generate token {{icon('caret-right')}}</button>
<a
class="btn btn-default" href="/oauth"
>Nevermind {{icon('caret-right')}}</a>
{% endif %}
</form>
</div>
{% endblock %}