Setup-Skript: Grant-Types und Logout-Redirect beim Portal-Provider setzen

Ohne grant_types lehnt Authentik jede Anmeldung mit "invalid_request /
The request is otherwise malformed" ab.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
kerimatilganandClaude Opus 5.5 committed 2026-09-27 13:24:07 +02:00
1 parent 5c1174ff90
commit cfe59e3652
1 file changed
+5 -2
+5 -2
View File
@@ -118,10 +118,13 @@ def ensure_portal_app(apps):
"authorization_flow": template["authorization_flow"],
"invalidation_flow": template["invalidation_flow"],
"client_type": "confidential",
# Neuere Authentik-Versionen setzen per API keine Standard-Grant-Types;
# ohne diese Liste lehnt Authentik jede Anmeldung als "malformed" ab.
"grant_types": ["authorization_code", "refresh_token"],
"redirect_uris": [
{"matching_mode": "strict", "url": f"{PORTAL_URL}/auth/callback"},
{"matching_mode": "strict", "url": f"{PORTAL_URL}/auth/callback", "redirect_uri_type": "authorization"},
# Rücksprung nach dem Abmelden (post_logout_redirect_uri)
{"matching_mode": "strict", "url": f"{PORTAL_URL}/"},
{"matching_mode": "strict", "url": f"{PORTAL_URL}/", "redirect_uri_type": "logout"},
],
"property_mappings": template["property_mappings"],
"signing_key": template.get("signing_key"),