trigger signup email if user doesn't have a password #94

Merged
neb-b merged 1 commit from signup into master 2020-04-16 16:54:04 +02:00
3 changed files with 54 additions and 41 deletions

10
dist/bundle.es.js vendored
View file

@ -1585,6 +1585,12 @@ function doUserCheckIfEmailExists(email) {
dispatch({ dispatch({
type: USER_PASSWORD_EXISTS type: USER_PASSWORD_EXISTS
}); });
} else {
// If they don't have a password, they will need to use the email verification api
Lbryio.call('user_email', 'resend_token', {
email,
only_if_expired: true
}, 'post');
} }
}; };
@ -1653,8 +1659,7 @@ function doUserSignIn(email, password) {
}; };
} }
function doUserSignUp(email, password) { function doUserSignUp(email, password) {
return dispatch => { return dispatch => new Promise((resolve, reject) => {
return new Promise((resolve, reject) => {
dispatch({ dispatch({
type: USER_EMAIL_NEW_STARTED, type: USER_EMAIL_NEW_STARTED,
email email
@ -1694,7 +1699,6 @@ function doUserSignUp(email, password) {
} : {}) } : {})
}, 'post').then(success, failure); }, 'post').then(success, failure);
}); });
};
} }
function doUserPasswordReset(email) { function doUserPasswordReset(email) {
return dispatch => { return dispatch => {

6
dist/bundle.js vendored
View file

@ -5303,6 +5303,12 @@ function doUserCheckIfEmailExists(email) {
dispatch({ dispatch({
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_PASSWORD_EXISTS"] type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_PASSWORD_EXISTS"]
}); });
} else {
// If they don't have a password, they will need to use the email verification api
lbryio__WEBPACK_IMPORTED_MODULE_5__["default"].call('user_email', 'resend_token', {
email: email,
only_if_expired: true
}, 'post');
} }
}; };

View file

@ -326,6 +326,9 @@ export function doUserCheckIfEmailExists(email) {
dispatch({ dispatch({
type: ACTIONS.USER_PASSWORD_EXISTS, type: ACTIONS.USER_PASSWORD_EXISTS,
}); });
} else {
// If they don't have a password, they will need to use the email verification api
Lbryio.call('user_email', 'resend_token', { email, only_if_expired: true }, 'post');
} }
}; };