Ensure Live Backend mode is enforced and clear old Demo localStorage session
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="loginEmail">Admin Email / Phone</label>
|
||||
<div class="form-input-group">
|
||||
<input type="text" id="loginEmail" class="form-input" placeholder="admin@siromove.com or +962..." value="admin@siromove.com" required>
|
||||
<input type="text" id="loginEmail" class="form-input" placeholder="hamzaayed@siromove.com or +962..." value="hamzaayed@siromove.com" required>
|
||||
<i class="ph ph-envelope"></i>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -83,12 +83,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
// Auth Functions
|
||||
function checkAuth() {
|
||||
if (currentUser) {
|
||||
if (currentUser && currentUser.isLive && currentUser.jwt) {
|
||||
authWrapper.classList.add('hidden');
|
||||
if (currentUser.isLive && currentUser.jwt) {
|
||||
fetchLiveDashboardData();
|
||||
}
|
||||
fetchLiveDashboardData();
|
||||
} else {
|
||||
// Clear stale/demo session to force fresh Live Backend Login
|
||||
localStorage.removeItem('siro_admin_user');
|
||||
currentUser = null;
|
||||
authWrapper.classList.remove('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user