Admin login now uses OpenID Connect (PKCE, nonce, ID token verified against the provider JWKS) and only OIDC_ADMIN_SUB may log in. Micropub tokens are issued and verified by StarPunk itself, with a consent screen behind the OIDC session and a Connected Apps page to revoke them, so an external IndieAuth server (Gondulf) is no longer needed. Existing notes, media, tags, webmentions, author profile and sessions are unchanged. Migration 011 adds new tables only. BREAKING CHANGE: production requires OIDC_ISSUER, OIDC_CLIENT_ID, OIDC_CLIENT_SECRET and OIDC_ADMIN_SUB. The ADMIN_ME page must point Micropub apps at StarPunk's IndieAuth endpoints. See ADR-064. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
44 lines
1.4 KiB
HTML
44 lines
1.4 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block title %}Authorize App - StarPunk{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="login-container authorize">
|
|
{% if request_error %}
|
|
<h2>Cannot authorize this app</h2>
|
|
<p>{{ request_error }}</p>
|
|
<p><a href="/">Return to homepage</a></p>
|
|
{% else %}
|
|
<h2>Authorize app</h2>
|
|
<p>
|
|
<strong>{{ auth_request.client_id }}</strong> wants to sign in as
|
|
<strong>{{ me }}</strong>.
|
|
</p>
|
|
<p><small>After approval you will be sent to {{ auth_request.redirect_uri }}</small></p>
|
|
|
|
<form action="{{ url_for('indieauth.approve') }}" method="POST" class="login-form">
|
|
{% for name, value in fields.items() %}
|
|
<input type="hidden" name="{{ name }}" value="{{ value }}">
|
|
{% endfor %}
|
|
|
|
{% if auth_request.scopes %}
|
|
<fieldset>
|
|
<legend>Permissions requested</legend>
|
|
{% for scope in auth_request.scopes %}
|
|
<label>
|
|
<input type="checkbox" name="scope_granted" value="{{ scope }}" checked>
|
|
{{ scope }}
|
|
</label><br>
|
|
{% endfor %}
|
|
</fieldset>
|
|
{% else %}
|
|
<p>This app only wants to confirm your identity. It cannot post.</p>
|
|
{% endif %}
|
|
|
|
<button type="submit" name="decision" value="approve" class="button button-primary">Approve</button>
|
|
<button type="submit" name="decision" value="deny" class="button button-secondary">Deny</button>
|
|
</form>
|
|
{% endif %}
|
|
</div>
|
|
{% endblock %}
|