diff --git a/apps/authentik/authentik-blueprints.yaml b/apps/authentik/authentik-blueprints.yaml index c1821c9..cf62362 100644 --- a/apps/authentik/authentik-blueprints.yaml +++ b/apps/authentik/authentik-blueprints.yaml @@ -78,3 +78,24 @@ data: order: 4 attrs: stage: !Find [authentik_stages_user_login.userloginstage, [name, default-source-enrollment-login]] + + # Without an explicit destination, the flow falls back to Authentik's own + # /if/user/ dashboard, which refuses type=external users ("Die Oberflaeche + # kann nur von internen Nutzern geoeffnet werden") - exactly the user type + # these Matrix-only accounts correctly have. Send them to Element instead. + - model: authentik_stages_redirect.redirectstage + state: present + identifiers: + name: matrix-invitation-redirect + id: matrix_invitation_redirect_stage + attrs: + mode: static + target_static: https://axion1337.chat + + - model: authentik_flows.flowstagebinding + state: present + identifiers: + target: !KeyOf matrix_invitation_flow + order: 5 + attrs: + stage: !KeyOf matrix_invitation_redirect_stage