import { Sib } from 'https://cdn.skypack.dev/@startinblox/core@0.16'; export const HublAutoLogin = { name: 'hubl-auto-login', created() { if (window.location.pathname == "/login") { document .querySelectorAll(".loggedIn-loader") .forEach(el => (el.style.display = "flex")); window.dispatchEvent( new CustomEvent('requestNavigation', { detail: { route: window.hubl.getRoute("dashboard", true) } }), ); document.querySelector("sib-auth").login(); } } } Sib.register(HublAutoLogin);