fix: redirect to email sign up on first login
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
0642002005
commit
3dbe69707f
@ -140,7 +140,12 @@ we recommend using your email address: ${user.email} to sign in instead.
|
||||
setAccessTokenToResponse({ accessToken }, req, res);
|
||||
req.login(user);
|
||||
}
|
||||
return res.redirectWithFlash(redirect);
|
||||
// TODO: enable 'returnTo' for sign-up
|
||||
if (user.acceptedPrivacyTerms) {
|
||||
return res.redirectWithFlash(redirect);
|
||||
} else {
|
||||
return res.redirectWithFlash(`${homeLocation}/email-sign-up`);
|
||||
}
|
||||
}
|
||||
)(req, res, next);
|
||||
};
|
||||
|
Reference in New Issue
Block a user