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:
@@ -7,9 +7,9 @@ export default defineNuxtRouteMiddleware(async (to) => {
|
||||
// Use the same auth system as the rest of the app
|
||||
const { isAuthenticated, checkAuth, user } = useAuth();
|
||||
|
||||
// Ensure auth is checked if user isn't loaded
|
||||
// Ensure auth is checked if user isn't loaded - use forced check for middleware
|
||||
if (!user.value) {
|
||||
await checkAuth();
|
||||
await checkAuth(true); // Force check to bypass throttling in middleware
|
||||
}
|
||||
|
||||
if (!isAuthenticated.value) {
|
||||
|
||||
Reference in New Issue
Block a user