feat: redirect to verify pages
This commit is contained in:
@ -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" />;
|
||||
|
Reference in New Issue
Block a user