Add mobile Safari reload loop prevention for auth pages
All checks were successful
Build And Push Image / docker (push) Successful in 3m2s

- Implement comprehensive reload loop prevention utility
- Add initialization checks to setup-password, verify, and signup pages
- Include timeout protection and error handling for config loading
- Add fallback defaults to prevent page failures on mobile devices
- Document mobile reload loop prevention system
This commit is contained in:
2025-08-10 16:21:54 +02:00
parent 86977ca92a
commit 8b05fdd3d7
6 changed files with 846 additions and 24 deletions

View File

@@ -312,8 +312,17 @@ const setupPassword = async () => {
};
// Component initialization - Safari iOS reload loop prevention
onMounted(() => {
onMounted(async () => {
console.log('[setup-password] Password setup page loaded for:', email.value);
// CRITICAL: Check reload loop prevention first
const { initReloadLoopPrevention } = await import('~/utils/reload-loop-prevention');
const canLoad = initReloadLoopPrevention('setup-password-page');
if (!canLoad) {
console.error('[setup-password] Page load blocked by reload loop prevention system');
return; // Stop all initialization if blocked
}
// Apply mobile Safari optimizations early
if (deviceInfo.isMobileSafari) {

View File

@@ -386,9 +386,18 @@ const retryVerification = async () => {
};
// Component initialization - Safari iOS reload loop prevention
onMounted(() => {
onMounted(async () => {
console.log('[auth/verify] Component mounted with token:', token?.substring(0, 20) + '...');
// CRITICAL: Check reload loop prevention first
const { initReloadLoopPrevention } = await import('~/utils/reload-loop-prevention');
const canLoad = initReloadLoopPrevention('verify-page');
if (!canLoad) {
console.error('[auth/verify] Page load blocked by reload loop prevention system');
return; // Stop all initialization if blocked
}
// Apply mobile Safari optimizations early
if (deviceInfo.isMobileSafari) {
applyMobileSafariOptimizations();