allow users to signin after they abandoned a previous signup
This commit is contained in:
parent
edd43c8dff
commit
cc62a4eec1
3 changed files with 25 additions and 6 deletions
10
dist/bundle.es.js
vendored
10
dist/bundle.es.js
vendored
|
@ -1570,7 +1570,7 @@ function doUserCheckIfEmailExists(email) {
|
|||
email
|
||||
});
|
||||
|
||||
const success = response => {
|
||||
const triggerEmailFlow = hasPassword => {
|
||||
dispatch({
|
||||
type: USER_EMAIL_NEW_SUCCESS,
|
||||
data: {
|
||||
|
@ -1581,7 +1581,7 @@ function doUserCheckIfEmailExists(email) {
|
|||
type: USER_EMAIL_NEW_EXISTS
|
||||
});
|
||||
|
||||
if (response.has_password) {
|
||||
if (hasPassword) {
|
||||
dispatch({
|
||||
type: USER_PASSWORD_EXISTS
|
||||
});
|
||||
|
@ -1594,6 +1594,10 @@ function doUserCheckIfEmailExists(email) {
|
|||
}
|
||||
};
|
||||
|
||||
const success = response => {
|
||||
triggerEmailFlow(response.has_password);
|
||||
};
|
||||
|
||||
const failure = error => dispatch({
|
||||
type: USER_EMAIL_NEW_FAILURE,
|
||||
data: {
|
||||
|
@ -1608,6 +1612,8 @@ function doUserCheckIfEmailExists(email) {
|
|||
dispatch({
|
||||
type: USER_EMAIL_NEW_DOES_NOT_EXIST
|
||||
});
|
||||
} else if (error.response && error.response.status === 412) {
|
||||
triggerEmailFlow(false);
|
||||
}
|
||||
|
||||
throw error;
|
||||
|
|
10
dist/bundle.js
vendored
10
dist/bundle.js
vendored
|
@ -5288,7 +5288,7 @@ function doUserCheckIfEmailExists(email) {
|
|||
email: email
|
||||
});
|
||||
|
||||
var success = function success(response) {
|
||||
var triggerEmailFlow = function triggerEmailFlow(hasPassword) {
|
||||
dispatch({
|
||||
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_EMAIL_NEW_SUCCESS"],
|
||||
data: {
|
||||
|
@ -5299,7 +5299,7 @@ function doUserCheckIfEmailExists(email) {
|
|||
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_EMAIL_NEW_EXISTS"]
|
||||
});
|
||||
|
||||
if (response.has_password) {
|
||||
if (hasPassword) {
|
||||
dispatch({
|
||||
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) {
|
||||
return dispatch({
|
||||
type: constants_action_types__WEBPACK_IMPORTED_MODULE_1__["USER_EMAIL_NEW_FAILURE"],
|
||||
|
@ -5328,6 +5332,8 @@ function doUserCheckIfEmailExists(email) {
|
|||
dispatch({
|
||||
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;
|
||||
|
|
|
@ -312,7 +312,7 @@ export function doUserCheckIfEmailExists(email) {
|
|||
email,
|
||||
});
|
||||
|
||||
const success = response => {
|
||||
const triggerEmailFlow = hasPassword => {
|
||||
dispatch({
|
||||
type: ACTIONS.USER_EMAIL_NEW_SUCCESS,
|
||||
data: { email },
|
||||
|
@ -322,7 +322,7 @@ export function doUserCheckIfEmailExists(email) {
|
|||
type: ACTIONS.USER_EMAIL_NEW_EXISTS,
|
||||
});
|
||||
|
||||
if (response.has_password) {
|
||||
if (hasPassword) {
|
||||
dispatch({
|
||||
type: ACTIONS.USER_PASSWORD_EXISTS,
|
||||
});
|
||||
|
@ -332,6 +332,10 @@ export function doUserCheckIfEmailExists(email) {
|
|||
}
|
||||
};
|
||||
|
||||
const success = response => {
|
||||
triggerEmailFlow(response.has_password);
|
||||
};
|
||||
|
||||
const failure = error =>
|
||||
dispatch({
|
||||
type: ACTIONS.USER_EMAIL_NEW_FAILURE,
|
||||
|
@ -344,7 +348,10 @@ export function doUserCheckIfEmailExists(email) {
|
|||
dispatch({
|
||||
type: ACTIONS.USER_EMAIL_NEW_DOES_NOT_EXIST,
|
||||
});
|
||||
} else if (error.response && error.response.status === 412) {
|
||||
triggerEmailFlow(false);
|
||||
}
|
||||
|
||||
throw error;
|
||||
})
|
||||
.then(success, failure);
|
||||
|
|
Loading…
Reference in a new issue