added user token or encryptedToken present check before credential redirect

This commit is contained in:
Abhinav-grd 2021-08-29 22:50:09 +05:30
parent aa1ae957af
commit f4cb568444

View file

@ -44,7 +44,10 @@ export default function Verify() {
); );
if (!user?.email) { if (!user?.email) {
router.push('/'); router.push('/');
} else if (keyAttributes?.encryptedKey) { } else if (
keyAttributes?.encryptedKey &&
(user.token || user.encryptedToken)
) {
router.push('credentials'); router.push('credentials');
} else { } else {
setEmail(user.email); setEmail(user.email);