Skip to content

Commit

Permalink
remove resetPassword and resendResetPassword
Browse files Browse the repository at this point in the history
remove password validation regex
  • Loading branch information
NikkiWines committed Jul 13, 2023
1 parent bfaf167 commit 97480a9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 81 deletions.
9 changes: 0 additions & 9 deletions src/libs/ValidationUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,14 +291,6 @@ function isValidUSPhone(phoneNumber = '', isCountryCodeOptional) {
return parsedPhoneNumber.possible && parsedPhoneNumber.regionCode === CONST.COUNTRY.US;
}

/**
* @param {String} password
* @returns {Boolean}
*/
function isValidPassword(password) {
return password.match(CONST.PASSWORD_COMPLEXITY_REGEX_STRING);
}

/**
* @param {string} validateCode
* @returns {Boolean}
Expand Down Expand Up @@ -461,7 +453,6 @@ export {
isValidUSPhone,
isValidWebsite,
validateIdentity,
isValidPassword,
isValidTwoFactorCode,
isNumericWithSpecialChars,
isValidPaypalUsername,
Expand Down
72 changes: 0 additions & 72 deletions src/libs/actions/Session/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -481,76 +481,6 @@ function initAutoAuthState(cachedAutoAuthState) {
});
}

/**
* User forgot the password so let's send them the link to reset their password
*/
function resetPassword() {
API.write(
'RequestPasswordReset',
{
email: credentials.login,
},
{
optimisticData: [
{
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.ACCOUNT,
value: {
errors: null,
forgotPassword: true,
message: null,
},
},
],
},
);
}

function resendResetPassword() {
API.write(
'ResendRequestPasswordReset',
{
email: credentials.login,
},
{
optimisticData: [
{
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.ACCOUNT,
value: {
isLoading: true,
forgotPassword: true,
message: null,
errors: null,
loadingForm: CONST.FORMS.RESEND_VALIDATION_FORM,
},
},
],
successData: [
{
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.ACCOUNT,
value: {
isLoading: false,
message: 'resendValidationForm.linkHasBeenResent',
loadingForm: null,
},
},
],
failureData: [
{
onyxMethod: Onyx.METHOD.MERGE,
key: ONYXKEYS.ACCOUNT,
value: {
isLoading: false,
loadingForm: null,
},
},
],
},
);
}

function invalidateCredentials() {
Onyx.merge(ONYXKEYS.CREDENTIALS, {autoGeneratedLogin: '', autoGeneratedPassword: ''});
}
Expand Down Expand Up @@ -889,8 +819,6 @@ export {
signOutAndRedirectToSignIn,
resendValidationLink,
resendValidateCode,
resetPassword,
resendResetPassword,
requestUnlinkValidationLink,
unlinkLogin,
clearSignInData,
Expand Down

0 comments on commit 97480a9

Please sign in to comment.