Fix 500 on redirect path (#201)

* Fix 500 on redirect path

Co-authored-by: anntnzrb <anntnzrb@proton.me>
This commit is contained in:
Christiaan Goossens
2026-02-06 11:07:46 +01:00
committed by GitHub
parent b2d07c28f0
commit 6f93a22c37
4 changed files with 8 additions and 4 deletions

View File

@@ -64,7 +64,9 @@ async def frontend_injection(hass: HomeAssistant, sso_name: str) -> None:
# Inject JS and register that route
injection_js = "<script src='/auth/oidc/static/injection.js?v=3'></script>"
sso_name_js = f"<script>window.sso_name = {json.dumps(sso_name)};</script>"
frontend_code = frontend_code.replace("</body>", f"{injection_js}{sso_name_js}</body>")
frontend_code = frontend_code.replace(
"</body>", f"{injection_js}{sso_name_js}</body>"
)
await hass.http.async_register_static_paths(
[