Fix auth throttling causing login loops by adding forced session checks
All checks were successful
Build And Push Image / docker (push) Successful in 3m27s
All checks were successful
Build And Push Image / docker (push) Successful in 3m27s
Add optional force parameter to checkAuth() to bypass throttling during critical authentication flows like login, middleware, and initial auth verification. This prevents iOS Safari login loops while maintaining throttling for regular session checks.
This commit is contained in:
@@ -132,7 +132,9 @@ const { user, login, loading: authLoading, error: authError, checkAuth } = useAu
|
||||
const { isMobileDevice, debugMobileLogin, runMobileDiagnostics } = await import('~/utils/mobile-utils');
|
||||
|
||||
// Check if user is already authenticated - prevent iOS Safari loops
|
||||
if (user.value) {
|
||||
// Use forced check to ensure we get accurate authentication status
|
||||
const isAlreadyAuthenticated = await checkAuth(true);
|
||||
if (isAlreadyAuthenticated && user.value) {
|
||||
const redirectUrl = '/dashboard';
|
||||
|
||||
// Always use window.location for iOS Safari to prevent loops
|
||||
|
||||
Reference in New Issue
Block a user