feat: redirect to verify pages

This commit is contained in:
2025-06-07 01:33:50 +02:00
parent ab3c2d1eb0
commit aa6de76ded

View File

@ -63,6 +63,18 @@ const AuthLayout = () => {
connecting,
]);
const verificationRequired = useMemo(() => {
return (
authProfile?.email_verified === false ||
authProfile?.avatar_verified === false ||
authProfile?.verified === false
);
}, [
authProfile?.avatar_verified,
authProfile?.email_verified,
authProfile?.verified,
]);
// OAuth
useEffect(() => {
console.log(
@ -140,7 +152,7 @@ const AuthLayout = () => {
if (
!signInRequired &&
authProfile?.email_verified === false &&
verificationRequired &&
!location.pathname.startsWith("/verify")
) {
return <Navigate to="/verify" />;