diff --git a/src/html/authorize.html.template b/src/html/authorize.html.template
index 1cf1c7bba4..555aea9e0e 100644
--- a/src/html/authorize.html.template
+++ b/src/html/authorize.html.template
@@ -48,6 +48,9 @@
window.providersPromise = fetch("/auth/providers", {
credentials: "same-origin",
});
+ if (!window.globalThis) {
+ window.globalThis = window;
+ }