From e4c658c4c7dd156a940ef9ba43fbd27a9dab4e8b Mon Sep 17 00:00:00 2001 From: Corentin Mors Date: Mon, 19 Aug 2024 08:55:35 +0200 Subject: [PATCH] Remove dashlane_authenticator 2FA path --- src/endpoints/index.ts | 1 - ...performDashlaneAuthenticatorVerification.ts | 18 ------------------ src/modules/auth/registerDevice.ts | 7 +++---- 3 files changed, 3 insertions(+), 23 deletions(-) delete mode 100644 src/endpoints/performDashlaneAuthenticatorVerification.ts diff --git a/src/endpoints/index.ts b/src/endpoints/index.ts index 8f222a8c..dc2bdb62 100644 --- a/src/endpoints/index.ts +++ b/src/endpoints/index.ts @@ -10,7 +10,6 @@ export * from './getTeamMembers.js'; export * from './getTeamReport.js'; export * from './listDevices.js'; export * from './listTeamDevices.js'; -export * from './performDashlaneAuthenticatorVerification.js'; export * from './performDuoPushVerification.js'; export * from './performEmailTokenVerification.js'; export * from './performTotpVerification.js'; diff --git a/src/endpoints/performDashlaneAuthenticatorVerification.ts b/src/endpoints/performDashlaneAuthenticatorVerification.ts deleted file mode 100644 index 40e90490..00000000 --- a/src/endpoints/performDashlaneAuthenticatorVerification.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { requestAppApi } from '../requestApi.js'; - -interface PerformDashlaneAuthenticatorVerification { - login: string; -} - -export interface PerformDashlaneAuthenticatorVerificationOutput { - /** - * Authentication ticket usable several time - */ - authTicket: string; -} - -export const performDashlaneAuthenticatorVerification = (params: PerformDashlaneAuthenticatorVerification) => - requestAppApi({ - path: 'authentication/PerformDashlaneAuthenticatorVerification', - payload: { login: params.login }, - }); diff --git a/src/modules/auth/registerDevice.ts b/src/modules/auth/registerDevice.ts index 4406b5de..6daa7f7c 100644 --- a/src/modules/auth/registerDevice.ts +++ b/src/modules/auth/registerDevice.ts @@ -2,7 +2,6 @@ import { doSSOVerification } from './sso/index.js'; import { doConfidentialSSOVerification } from './confidential-sso/index.js'; import { completeDeviceRegistration, - performDashlaneAuthenticatorVerification, performDuoPushVerification, performEmailTokenVerification, performTotpVerification, @@ -29,6 +28,9 @@ export const registerDevice = async (params: RegisterDevice) => { const nonEmptyVerifications = verifications.filter((method) => method.type); + // Remove dashlane_authenticator from the list of verification methods as it is a deprecated method + nonEmptyVerifications.filter((method) => method.type !== 'dashlane_authenticator'); + const selectedVerificationMethod = nonEmptyVerifications.length > 1 ? await askVerificationMethod(nonEmptyVerifications) @@ -43,9 +45,6 @@ export const registerDevice = async (params: RegisterDevice) => { if (selectedVerificationMethod.type === 'duo_push') { logger.info('Please accept the Duo push notification on your phone.'); ({ authTicket } = await performDuoPushVerification({ login })); - } else if (selectedVerificationMethod.type === 'dashlane_authenticator') { - logger.info('Please accept the Dashlane Authenticator push notification on your phone.'); - ({ authTicket } = await performDashlaneAuthenticatorVerification({ login })); } else if (selectedVerificationMethod.type === 'totp') { const otp = await askOtp(); ({ authTicket } = await performTotpVerification({