From 36581e384cf32fb301f6e141bb995ea8ed164708 Mon Sep 17 00:00:00 2001 From: Corentin Mors Date: Tue, 1 Aug 2023 11:28:16 +0200 Subject: [PATCH] Send correct device name at registration Fix #122 --- src/endpoints/completeDeviceRegistration.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/endpoints/completeDeviceRegistration.ts b/src/endpoints/completeDeviceRegistration.ts index 7d22b6ac..d4269c82 100644 --- a/src/endpoints/completeDeviceRegistration.ts +++ b/src/endpoints/completeDeviceRegistration.ts @@ -1,3 +1,4 @@ +import os from 'os'; import { CLI_VERSION, cliVersionToString } from '../cliVersion'; import { requestAppApi } from '../requestApi'; @@ -63,9 +64,9 @@ export const completeDeviceRegistration = (params: CompleteDeviceRegistration) = path: 'authentication/CompleteDeviceRegistrationWithAuthTicket', payload: { device: { - deviceName: 'Dashlane CLI', - appVersion: `${cliVersionToString(CLI_VERSION)}-cli`, - platform: 'server_standalone', + deviceName: `${os.hostname()} - ${os.platform()}-${os.arch()}`, + appVersion: `${cliVersionToString(CLI_VERSION)}`, + platform: 'server_cli', osCountry: 'en_US', osLanguage: 'en_US', temporary: false,