From 39a1affcbc382aa306d7fe2eb23043e88cad52bc Mon Sep 17 00:00:00 2001 From: Daniel Onyejesi Date: Sun, 22 Mar 2026 12:13:41 -0400 Subject: [PATCH] Fix: clear password fields, remove has-session class, and reset hash on logout --- docker-compose.yml | 2 +- public/js/auth.js | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index eba170a..da6b52f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,6 +1,6 @@ services: pediatric-scribe: - image: danielonyejesi/pediatric-ai-scribe-v3:v1.6 + image: danielonyejesi/pediatric-ai-scribe-v3:v1.7 ports: - "3552:3000" env_file: diff --git a/public/js/auth.js b/public/js/auth.js index ae4ae27..0b399a1 100644 --- a/public/js/auth.js +++ b/public/js/auth.js @@ -97,6 +97,15 @@ document.addEventListener('DOMContentLoaded', function() { function exitApp() { clearSession(); + // Remove has-session class so auth screen CSS override is lifted + document.documentElement.classList.remove('has-session'); + // Clear all auth input fields + ['login-email', 'login-password', 'reg-name', 'reg-email', 'reg-password', 'login-totp'].forEach(function(id) { + var el = document.getElementById(id); + if (el) el.value = ''; + }); + // Clear URL hash + history.replaceState(null, '', window.location.pathname); if (authScreen) authScreen.style.display = 'flex'; if (mainApp) mainApp.style.display = 'none'; var adminTabBtn = document.getElementById('admin-tab-btn');