feat!: OIDC admin login and built-in IndieAuth server (v2.0.0)
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>
This commit is contained in:
1 parent
d3fa5b7a2a
commit
b84cf23e1a
29 files changed
+1824
-2354
No files matched your search
@@ -816,3 +816,25 @@ def webmention_bulk_action():
|
||||
logger.error(f"Error performing bulk action: {e}")
|
||||
flash(f"Error: {e}", "error")
|
||||
return redirect(url_for("admin.webmentions"))
|
||||
|
||||
|
||||
# Connected Micropub apps (v2.0.0)
|
||||
|
||||
@bp.route("/tokens")
|
||||
@require_auth
|
||||
def tokens():
|
||||
"""List active IndieAuth tokens. Template: templates/admin/tokens.html"""
|
||||
from starpunk.indieauth import list_active_tokens
|
||||
|
||||
return render_template("admin/tokens.html", tokens=list_active_tokens(), user_me=g.me)
|
||||
|
||||
|
||||
@bp.route("/tokens/<int:token_id>/revoke", methods=["POST"])
|
||||
@require_auth
|
||||
def revoke_token(token_id):
|
||||
"""Revoke one IndieAuth token"""
|
||||
from starpunk.indieauth import revoke_token_by_id
|
||||
|
||||
revoke_token_by_id(token_id)
|
||||
flash("App access revoked", "success")
|
||||
return redirect(url_for("admin.tokens"))
|
||||
Reference in new issue
Block a user