Fix iOS Safari auth loops and simplify admin dashboard
All checks were successful
Build And Push Image / docker (push) Successful in 3m4s

- Add session check throttling in useAuth to prevent iOS Safari authentication loops
- Simplify admin dashboard by removing complex system metrics and stats
- Remove system-metrics utility and streamline stats API endpoint
- Update admin interface to focus on core user and role management
This commit is contained in:
2025-08-07 16:20:05 +02:00
parent 146b3c9400
commit 2843bcf4f5
5 changed files with 288 additions and 711 deletions

View File

@@ -150,9 +150,24 @@ export const useAuth = () => {
}
};
// Check authentication status
// Session check throttling to prevent iOS Safari loops
const lastSessionCheck = ref(0);
const SESSION_CHECK_THROTTLE = 5000; // 5 seconds minimum between checks
// Check authentication status with debouncing
const checkAuth = async () => {
const now = Date.now();
// Throttle session checks to prevent iOS Safari loops
if (now - lastSessionCheck.value < SESSION_CHECK_THROTTLE) {
console.log('🚫 Session check throttled, using cached result');
return !!user.value;
}
try {
console.log('🔄 Performing throttled session check...');
lastSessionCheck.value = now;
const response = await $fetch<{
authenticated: boolean;
user: User | null;