diff --git a/index.html b/index.html
index dfad638741..4bd911162a 100644
--- a/index.html
+++ b/index.html
@@ -61,7 +61,7 @@
document.getElementById('ha-init-skeleton').classList.add('error');
};
window.noAuth = '{{ no_auth }}';
- window.clientId = '{{ client_id }}'
+ window.useOAuth = '{{ use_oauth }}'
window.Polymer = {
lazyRegister: true,
useNativeCSSProperties: true,
diff --git a/src/entrypoints/core.js b/src/entrypoints/core.js
index c6b314eaf5..76647a9430 100644
--- a/src/entrypoints/core.js
+++ b/src/entrypoints/core.js
@@ -86,7 +86,7 @@ function mainLegacy() {
}
}
-if (window.clientId) {
+if (window.useOAuth === '1') {
main();
} else {
mainLegacy();