Skip to content

Commit 7cb091b

Browse files
author
Corentin Mors
authored
Fix: url encode login at device registration (#219)
A user reported a failed authentication when using `+` signs in their login emails. We're now generating properly encoded login urls.
1 parent 0df5330 commit 7cb091b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/modules/auth/registerDevice.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ export const registerDevice = async (params: RegisterDevice) => {
5252
otp,
5353
}));
5454
} else if (selectedVerificationMethod.type === 'email_token') {
55+
const urlEncodedLogin = encodeURIComponent(login);
5556
winston.info(
56-
`Please open the following URL in your browser: https://www.dashlane.com/cli-device-registration?login=${login}`
57+
`Please open the following URL in your browser: https://www.dashlane.com/cli-device-registration?login=${urlEncodedLogin}`
5758
);
5859
const token = await askToken();
5960
({ authTicket } = await performEmailTokenVerification({

0 commit comments

Comments
 (0)