More necromancy. This probably isn't the most elegant way to do this, but it seems to work, and the other two posted above no longer do.
<script>
try {
if (!app.user.uid && window.location.pathname
!== '/login' && window.location.pathname
!== '/register' && !window.location.pathname.startsWith('/reset')) {
document.location.replace('/login');
}
} catch (error) {
// the page hasn't yet loaded
}
window.onload = function () {
if (!app.user.uid && window.location.pathname
!== '/login' && window.location.pathname
!== '/register' && !window.location.pathname.startsWith('/reset')) {
document.location.replace('/login');
}
};
</script>