@@ -51,13 +51,6 @@ export function useVerification({
5151      const  storedEmail  =  sessionStorage . getItem ( 'verificationEmail' ) 
5252      if  ( storedEmail )  { 
5353        setEmail ( storedEmail ) 
54-       }  else  { 
55-         // If no email is stored, the verification session is invalid 
56-         // Clear the verification requirement and redirect to login 
57-         document . cookie  = 
58-           'requiresEmailVerification=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT' 
59-         window . location . href  =  '/login' 
60-         return 
6154      } 
6255
6356      // Check for redirect information 
@@ -233,30 +226,6 @@ export function useVerification({
233226    } 
234227  } ,  [ otp ,  email ,  isLoading ,  isVerified ] ) 
235228
236-   // Clean up verification state on unmount or after 15 minutes 
237-   useEffect ( ( )  =>  { 
238-     const  cleanupTimer  =  setTimeout ( 
239-       ( )  =>  { 
240-         // Clear verification state after 15 minutes 
241-         if  ( typeof  window  !==  'undefined'  &&  ! isVerified )  { 
242-           sessionStorage . removeItem ( 'verificationEmail' ) 
243-           sessionStorage . removeItem ( 'inviteRedirectUrl' ) 
244-           sessionStorage . removeItem ( 'isInviteFlow' ) 
245-           document . cookie  = 
246-             'requiresEmailVerification=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT' 
247- 
248-           // Redirect to login 
249-           window . location . href  =  '/login' 
250-         } 
251-       } , 
252-       15  *  60  *  1000 
253-     )  // 15 minutes 
254- 
255-     return  ( )  =>  { 
256-       clearTimeout ( cleanupTimer ) 
257-     } 
258-   } ,  [ isVerified ] ) 
259- 
260229  useEffect ( ( )  =>  { 
261230    if  ( typeof  window  !==  'undefined' )  { 
262231      if  ( ! isProduction  ||  ! hasResendKey )  { 
0 commit comments