Skip to content

Remove passwordless beta logic #22461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
0ed9b58
remove canUsePasswordless
NikkiWines Jul 8, 2023
12f524b
remove password form and resendvalidatecode form from sign in
NikkiWines Jul 8, 2023
f43cc2e
remove forms
NikkiWines Jul 8, 2023
81d8d05
remove change password view from settings
NikkiWines Jul 8, 2023
e98b651
remove password popover
NikkiWines Jul 13, 2023
a2918cf
remove updatePassword and remove password from updateContactMethod
NikkiWines Jul 13, 2023
bfaf167
update basepayment page and makeDefaultPaymentMethod to no longer req…
NikkiWines Jul 13, 2023
97480a9
remove resetPassword and resendResetPassword
NikkiWines Jul 13, 2023
f40958c
remove password from signIn
NikkiWines Jul 13, 2023
5cb825f
comment updates
NikkiWines Jul 13, 2023
05e4a51
prettier style
NikkiWines Jul 13, 2023
ab55c1c
Merge branch 'main' of github.com:Expensify/App into nikki-remove-pas…
NikkiWines Jul 14, 2023
caf8267
Merge branch 'main' of github.com:Expensify/App into nikki-remove-pas…
NikkiWines Jul 15, 2023
fd6f4c6
prettier style
NikkiWines Jul 15, 2023
5f457ce
remove unused import
NikkiWines Jul 15, 2023
00d1509
Merge branch 'main' of github.com:Expensify/App into nikki-remove-pas…
NikkiWines Jul 18, 2023
5b53848
addDebitCard merge fix
NikkiWines Jul 18, 2023
9cb8b9e
Merge branch 'main' of github.com:Expensify/App into nikki-remove-pas…
NikkiWines Jul 18, 2023
914d9e7
remove updatepasswordandsignin
NikkiWines Jul 18, 2023
f33858b
Merge branch 'nikki-remove-passwordless-dependencies' of github.com:E…
NikkiWines Jul 18, 2023
f1aa14c
Merge branch 'main' of github.com:Expensify/App into nikki-remove-pas…
NikkiWines Jul 19, 2023
972d0ad
Merge branch 'main' of github.com:Expensify/App into nikki-remove-pas…
NikkiWines Jul 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/ROUTES.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ export default {
SETTINGS_WORKSPACES: 'settings/workspaces',
SETTINGS_SECURITY: 'settings/security',
SETTINGS_CLOSE: 'settings/security/closeAccount',
SETTINGS_PASSWORD: 'settings/security/password',
SETTINGS_ABOUT: 'settings/about',
SETTINGS_APP_DOWNLOAD_LINKS: 'settings/about/app-download-links',
SETTINGS_PAYMENTS: 'settings/payments',
Expand Down
94 changes: 0 additions & 94 deletions src/components/PasswordPopover/BasePasswordPopover.js

This file was deleted.

18 changes: 0 additions & 18 deletions src/components/PasswordPopover/index.android.js

This file was deleted.

17 changes: 0 additions & 17 deletions src/components/PasswordPopover/index.js

This file was deleted.

28 changes: 0 additions & 28 deletions src/components/PasswordPopover/passwordPopoverPropTypes.js

This file was deleted.

2 changes: 1 addition & 1 deletion src/libs/Authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ function Authenticate(parameters) {
// and password.
useExpensifyLogin: parameters.useExpensifyLogin,
partnerName: parameters.partnerName,
partnerPassword: parameters.partnerPassword,
partnerPassword: parameters.partnerPassyword,
Copy link
Contributor

@techievivek techievivek Jul 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had a typo here 😢

P.s.: Fixing this here #23532

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah oops, nice catch - thank you

partnerUserID: parameters.partnerUserID,
partnerUserSecret: parameters.partnerUserSecret,
twoFactorAuthCode: parameters.twoFactorAuthCode,
Expand Down
7 changes: 0 additions & 7 deletions src/libs/Navigation/AppNavigator/ModalStackNavigators.js
Original file line number Diff line number Diff line change
Expand Up @@ -431,13 +431,6 @@ const SettingsModalStackNavigator = createModalStackNavigator([
// },
// name: 'Settings_Preferences_Theme',
// },
{
getComponent: () => {
const SettingsPasswordPage = require('../../../pages/settings/PasswordPage').default;
return SettingsPasswordPage;
},
name: 'Settings_Password',
},
{
getComponent: () => {
const SettingsCloseAccountPage = require('../../../pages/settings/Security/CloseAccountPage').default;
Expand Down
4 changes: 0 additions & 4 deletions src/libs/Navigation/linkingConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ export default {
path: ROUTES.SETTINGS_CLOSE,
exact: true,
},
Settings_Password: {
path: ROUTES.SETTINGS_PASSWORD,
exact: true,
},
Settings_Security: {
path: ROUTES.SETTINGS_SECURITY,
exact: true,
Expand Down
9 changes: 0 additions & 9 deletions src/libs/Permissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,6 @@ function canUsePolicyExpenseChat(betas) {
return _.contains(betas, CONST.BETAS.POLICY_EXPENSE_CHAT) || canUseAllBetas(betas);
}

/**
* @param {Array<String>} betas
* @returns {Boolean}
*/
function canUsePasswordlessLogins(betas) {
return _.contains(betas, CONST.BETAS.PASSWORDLESS) || canUseAllBetas(betas);
}

/**
* @param {Array<String>} betas
* @returns {Boolean}
Expand All @@ -111,7 +103,6 @@ export default {
canUseCommentLinking,
canUsePolicyRooms,
canUsePolicyExpenseChat,
canUsePasswordlessLogins,
canUseTasks,
canUseScanReceipts,
};
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
5 changes: 1 addition & 4 deletions src/libs/actions/PaymentMethods.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,18 +120,16 @@ function getMakeDefaultPaymentOnyxData(bankAccountID, fundID, previousPaymentMet
/**
* Sets the default bank account or debit card for an Expensify Wallet
*
* @param {String} password
* @param {Number} bankAccountID
* @param {Number} fundID
* @param {Object} previousPaymentMethod
* @param {Object} currentPaymentMethod
*
*/
function makeDefaultPaymentMethod(password, bankAccountID, fundID, previousPaymentMethod, currentPaymentMethod) {
function makeDefaultPaymentMethod(bankAccountID, fundID, previousPaymentMethod, currentPaymentMethod) {
API.write(
'MakeDefaultPaymentMethod',
{
password,
bankAccountID,
fundID,
},
Expand Down Expand Up @@ -162,7 +160,6 @@ function addPaymentCard(params) {
addressZip: params.addressZipCode,
currency: CONST.CURRENCY.USD,
isP2PDebitCard: true,
password: params.password,
},
{
optimisticData: [
Expand Down
79 changes: 2 additions & 77 deletions src/libs/actions/Session/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,12 +316,11 @@ function signInWithShortLivedAuthToken(email, authToken) {
* then it will create a temporary login for them which is used when re-authenticating
* after an authToken expires.
*
* @param {String} password This will be removed after passwordless beta ends
* @param {String} [validateCode] Code for passwordless login
* @param {String} validateCode 6 digit code required for login
* @param {String} [twoFactorAuthCode]
* @param {String} [preferredLocale] Indicates which language to use when the user lands in the app
*/
function signIn(password, validateCode, twoFactorAuthCode, preferredLocale = CONST.LOCALES.DEFAULT) {
function signIn(validateCode, twoFactorAuthCode, preferredLocale = CONST.LOCALES.DEFAULT) {
const optimisticData = [
{
onyxMethod: Onyx.METHOD.MERGE,
Expand Down Expand Up @@ -372,8 +371,6 @@ function signIn(password, validateCode, twoFactorAuthCode, preferredLocale = CON
// Conditionally pass a password or validateCode to command since we temporarily allow both flows
if (validateCode || twoFactorAuthCode) {
params.validateCode = validateCode || credentials.validateCode;
} else {
params.password = password;
}
Device.getDeviceInfoWithID().then((deviceInfo) => {
API.write('SigninUser', {...params, deviceInfo}, {optimisticData, successData, failureData});
Expand Down Expand Up @@ -479,76 +476,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 @@ -908,8 +835,6 @@ export {
signOutAndRedirectToSignIn,
resendValidationLink,
resendValidateCode,
resetPassword,
resendResetPassword,
requestUnlinkValidationLink,
unlinkLogin,
clearSignInData,
Expand Down
Loading