Skip to content

Commit

Permalink
New CLI registration flow (#180)
Browse files Browse the repository at this point in the history
Use the new CLI device registration flow via
www.dashlane.com/cli-device-registration
  • Loading branch information
Mikescops authored Aug 30, 2023
1 parent 4bda796 commit e026388
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 64 deletions.
1 change: 0 additions & 1 deletion src/endpoints/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@ export * from './performDashlaneAuthenticatorVerification';
export * from './performDuoPushVerification';
export * from './performEmailTokenVerification';
export * from './performTotpVerification';
export * from './requestDeviceRegistration';
export * from './registerTeamDevice';
44 changes: 0 additions & 44 deletions src/endpoints/requestDeviceRegistration.ts

This file was deleted.

16 changes: 0 additions & 16 deletions src/endpoints/requestEmailTokenVerification.ts

This file was deleted.

6 changes: 3 additions & 3 deletions src/modules/auth/registerDevice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
} from '../../endpoints';
import { askOtp, askToken, askVerificationMethod } from '../../utils';
import { getAuthenticationMethodsForDevice } from '../../endpoints/getAuthenticationMethodsForDevice';
import { requestEmailTokenVerification } from '../../endpoints/requestEmailTokenVerification';

interface RegisterDevice {
login: string;
Expand Down Expand Up @@ -53,8 +52,9 @@ export const registerDevice = async (params: RegisterDevice) => {
otp,
}));
} else if (selectedVerificationMethod.type === 'email_token') {
await requestEmailTokenVerification({ login });

winston.info(
`Please open the following URL in your browser: https://www.dashlane.com/cli-device-registration?login=${login}`
);
const token = await askToken();
({ authTicket } = await performEmailTokenVerification({
login,
Expand Down

0 comments on commit e026388

Please sign in to comment.