From d7ad28a2cb3cc8e0c3fb2281f4a45424ba06adb5 Mon Sep 17 00:00:00 2001 From: Paul Tournemaine Date: Wed, 23 Oct 2024 17:43:50 +0200 Subject: [PATCH] fix: remove the option Dashlane authenticator for verification method --- src/modules/auth/registerDevice.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modules/auth/registerDevice.ts b/src/modules/auth/registerDevice.ts index 6daa7f7..216ab73 100644 --- a/src/modules/auth/registerDevice.ts +++ b/src/modules/auth/registerDevice.ts @@ -26,10 +26,11 @@ export const registerDevice = async (params: RegisterDevice) => { throw new Error('Master password-less is currently not supported'); } - const nonEmptyVerifications = verifications.filter((method) => method.type); - + // Remove empty verification type // Remove dashlane_authenticator from the list of verification methods as it is a deprecated method - nonEmptyVerifications.filter((method) => method.type !== 'dashlane_authenticator'); + const nonEmptyVerifications = verifications.filter( + (method) => method.type && method.type !== 'dashlane_authenticator' + ); const selectedVerificationMethod = nonEmptyVerifications.length > 1