fix: redirect unverified users to verification page (#53) #54
@@ -26,6 +26,14 @@ export const HomePage = () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if user has a pending email verification (signed up but not verified)
|
||||||
|
const pendingVerificationEmail = localStorage.getItem('pendingVerificationEmail');
|
||||||
|
if (pendingVerificationEmail) {
|
||||||
|
// Redirect to verify-email page with the stored email
|
||||||
|
navigate('/verify-email', { state: { email: pendingVerificationEmail } });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
loginWithRedirect({ appState: { returnTo: '/garage' } });
|
loginWithRedirect({ appState: { returnTo: '/garage' } });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user