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({
|
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
6
dist/bundle.js
vendored
|
@ -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');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue