mirror of
https://github.com/element-hq/matrix-authentication-service.git
synced 2026-08-06 23:29:46 +00:00
Instead of injecting configuration through inline <script> tags setting window globals, server-rendered templates now carry the configuration as data attributes on the entrypoint mount node, validated client-side with a valibot schema over element.dataset. This removes all inline scripts from the templates, which is friendlier to CSP, and gives the frontend runtime-validated, typed configuration. The DOM read and the wiring now happen in the entrypoints themselves: main.tsx parses the mount node dataset, owns the QueryClient, and injects the basepath and GraphQL endpoint into the router and request layer instead of those being module-scope singletons.