Added auto setting for redirect urls for keycloak clients. Element and Synapse still need to be mapped

This commit is contained in:
2025-08-11 00:17:18 +02:00
parent 0746acedfd
commit 6e8ae793e3
17 changed files with 436 additions and 56 deletions

View File

@@ -833,20 +833,8 @@
"alwaysDisplayInConsole": false,
"clientAuthenticatorType": "desktop-secret",
"secret": "{{oidc.client.secret}}",
{%- set redirect_uris = [] %}
{%- for domain_application_id, domain in domains.items() %}
{%- if applications | get_app_conf(domain_application_id, 'features.oauth2', False) or applications | get_app_conf(domain_application_id, 'features.oidc', False) %}
{%- if domain is string %}
{%- set _ = redirect_uris.append(WEB_PROTOCOL ~ '://' ~ domain ~ '/*') %}
{%- else %}
{%- for d in domain %}
{%- set _ = redirect_uris.append(WEB_PROTOCOL ~ '://' ~ d ~ '/*') %}
{%- endfor %}
{%- endif %}
{%- endif %}
{%- endfor %}
"redirectUris": {{ redirect_uris | tojson }},
{# The following line should be covered by 02_update_client_redirects.yml #}
"redirectUris": {{ domains | redirect_uris(applications, WEB_PROTOCOL) | tojson }},
"webOrigins": [
"{{ WEB_PROTOCOL }}://*.{{primary_domain}}"
],