trigger signup email if user doesn't have a password #94
3 changed files with 54 additions and 41 deletions
10
dist/bundle.es.js
vendored
10
dist/bundle.es.js
vendored
|
@ -1585,6 +1585,12 @@ function doUserCheckIfEmailExists(email) {
|
|||
dispatch({
|
||||
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) {
|
||||
return dispatch => {
|
||||
return new Promise((resolve, reject) => {
|
||||
return dispatch => new Promise((resolve, reject) => {
|
||||
dispatch({
|
||||
type: USER_EMAIL_NEW_STARTED,
|
||||
email
|
||||
|
@ -1694,7 +1699,6 @@ function doUserSignUp(email, password) {
|
|||
} : {})
|
||||
}, 'post').then(success, failure);
|
||||
});
|
||||
};
|
||||
}
|
||||
function doUserPasswordReset(email) {
|
||||
return dispatch => {
|
||||
|
|
6
dist/bundle.js
vendored
6
dist/bundle.js
vendored
|
@ -5303,6 +5303,12 @@ function doUserCheckIfEmailExists(email) {
|
|||
dispatch({
|
||||
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');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -326,6 +326,9 @@ export function doUserCheckIfEmailExists(email) {
|
|||
dispatch({
|
||||
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');
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue