allow users to signin after they abandoned a previous signup

This commit is contained in:
Sean Yesmunt 2020-04-23 14:14:43 -04:00
parent edd43c8dff
commit cc62a4eec1
3 changed files with 25 additions and 6 deletions

10
dist/bundle.es.js vendored
View file

@ -1570,7 +1570,7 @@ function doUserCheckIfEmailExists(email) {
email email
}); });
const success = response => { const triggerEmailFlow = hasPassword => {
dispatch({ dispatch({
type: USER_EMAIL_NEW_SUCCESS, type: USER_EMAIL_NEW_SUCCESS,
data: { data: {
@ -1581,7 +1581,7 @@ function doUserCheckIfEmailExists(email) {
type: USER_EMAIL_NEW_EXISTS type: USER_EMAIL_NEW_EXISTS
}); });
if (response.has_password) { if (hasPassword) {
dispatch({ dispatch({
type: USER_PASSWORD_EXISTS type: USER_PASSWORD_EXISTS
}); });
@ -1594,6 +1594,10 @@ function doUserCheckIfEmailExists(email) {
} }
}; };
const success = response => {
triggerEmailFlow(response.has_password);
};
const failure = error => dispatch({ const failure = error => dispatch({
type: USER_EMAIL_NEW_FAILURE, type: USER_EMAIL_NEW_FAILURE,
data: { data: {
@ -1608,6 +1612,8 @@ function doUserCheckIfEmailExists(email) {
dispatch({ dispatch({
type: USER_EMAIL_NEW_DOES_NOT_EXIST type: USER_EMAIL_NEW_DOES_NOT_EXIST
}); });
} else if (error.response && error.response.status === 412) {
triggerEmailFlow(false);
} }
throw error; throw error;

10
dist/bundle.js vendored
View file

@ -5288,7 +5288,7 @@ function doUserCheckIfEmailExists(email) {
email: email email: email
}); });
var success = function success(response) { var triggerEmailFlow = function triggerEmailFlow(hasPassword) {
dispatch({ dispatch({
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_EMAIL_NEW_SUCCESS"], type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_EMAIL_NEW_SUCCESS"],
data: { data: {
@ -5299,7 +5299,7 @@ function doUserCheckIfEmailExists(email) {
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_EMAIL_NEW_EXISTS"] type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_EMAIL_NEW_EXISTS"]
}); });
if (response.has_password) { if (hasPassword) {
dispatch({ dispatch({
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_PASSWORD_EXISTS"] type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_PASSWORD_EXISTS"]
}); });
@ -5312,6 +5312,10 @@ function doUserCheckIfEmailExists(email) {
} }
}; };
var success = function success(response) {
triggerEmailFlow(response.has_password);
};
var failure = function failure(error) { var failure = function failure(error) {
return dispatch({ return dispatch({
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_EMAIL_NEW_FAILURE"], type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_EMAIL_NEW_FAILURE"],
@ -5328,6 +5332,8 @@ function doUserCheckIfEmailExists(email) {
dispatch({ dispatch({
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_EMAIL_NEW_DOES_NOT_EXIST"] type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_EMAIL_NEW_DOES_NOT_EXIST"]
}); });
} else if (error.response && error.response.status === 412) {
triggerEmailFlow(false);
} }
throw error; throw error;

View file

@ -312,7 +312,7 @@ export function doUserCheckIfEmailExists(email) {
email, email,
}); });
const success = response => { const triggerEmailFlow = hasPassword => {
dispatch({ dispatch({
type: ACTIONS.USER_EMAIL_NEW_SUCCESS, type: ACTIONS.USER_EMAIL_NEW_SUCCESS,
data: { email }, data: { email },
@ -322,7 +322,7 @@ export function doUserCheckIfEmailExists(email) {
type: ACTIONS.USER_EMAIL_NEW_EXISTS, type: ACTIONS.USER_EMAIL_NEW_EXISTS,
}); });
if (response.has_password) { if (hasPassword) {
dispatch({ dispatch({
type: ACTIONS.USER_PASSWORD_EXISTS, type: ACTIONS.USER_PASSWORD_EXISTS,
}); });
@ -332,6 +332,10 @@ export function doUserCheckIfEmailExists(email) {
} }
}; };
const success = response => {
triggerEmailFlow(response.has_password);
};
const failure = error => const failure = error =>
dispatch({ dispatch({
type: ACTIONS.USER_EMAIL_NEW_FAILURE, type: ACTIONS.USER_EMAIL_NEW_FAILURE,
@ -344,7 +348,10 @@ export function doUserCheckIfEmailExists(email) {
dispatch({ dispatch({
type: ACTIONS.USER_EMAIL_NEW_DOES_NOT_EXIST, type: ACTIONS.USER_EMAIL_NEW_DOES_NOT_EXIST,
}); });
} else if (error.response && error.response.status === 412) {
triggerEmailFlow(false);
} }
throw error; throw error;
}) })
.then(success, failure); .then(success, failure);