2026-04-16-1

This commit is contained in:
Hamza-Ayed
2026-04-16 03:39:49 +03:00
parent 3d61362602
commit 58f06eeba3
15 changed files with 579 additions and 106 deletions
+7 -4
View File
@@ -18,14 +18,17 @@ const auth = {
auth.firebaseAuth.onAuthStateChanged(async (user) => {
if (user) {
console.log('✅ User logged in:', user.email);
// Show Dashboard, Hide Login IMMEDIATELY to prevent black screen
auth.toggleUI(true);
auth.currentUser = user;
auth.idToken = await user.getIdToken();
// Show Dashboard, Hide Login
auth.toggleUI(true);
// Initialize main app data
app.onAuthenticated();
if (typeof app !== 'undefined' && app.onAuthenticated) {
app.onAuthenticated();
}
} else {
console.log('❌ No active session.');
auth.currentUser = null;