Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PM-3953] Generalize copy for login with device (clients) #12729

Merged
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
650cbd2
Fix strict typing errors
alec-livefront Dec 30, 2024
f33ace7
Update login via auth request component titles
alec-livefront Jan 6, 2025
70e4c75
Add content to login via auth request component
alec-livefront Jan 6, 2025
df852c1
Update translations for Receiving device approval modal
alec-livefront Jan 6, 2025
27065a3
Revert "Fix strict typing errors"
alec-livefront Jan 6, 2025
e736dd7
Update translations for Receiving device alert when minimized
alec-livefront Jan 6, 2025
faeffe5
clean up invalid tailwind classes
alec-livefront Jan 6, 2025
a99cb6f
Update content for new login via auth request component
alec-livefront Jan 6, 2025
46b0428
Remove debug
alec-livefront Jan 7, 2025
f651c78
Keep old translation versions
alec-livefront Jan 7, 2025
af49202
Remove old translation
alec-livefront Jan 7, 2025
c6343a6
Merge branch 'main' into auth/pm-3953/generalize-copy-for-login-with-โ€ฆ
alec-livefront Jan 7, 2025
3d2c2ba
Remove unused translations
alec-livefront Jan 7, 2025
51817a2
Merge branch 'auth/pm-3953/generalize-copy-for-login-with-device' of โ€ฆ
alec-livefront Jan 7, 2025
21a4309
Merge branch 'main' into auth/pm-3953/generalize-copy-for-login-with-โ€ฆ
alec-livefront Jan 11, 2025
3f9865b
Update notification title
alec-livefront Jan 15, 2025
d280e38
Fix typo and remove extra await
alec-livefront Jan 15, 2025
bd2d9fa
Merge branch 'main' into auth/pm-3953/generalize-copy-for-login-with-โ€ฆ
alec-livefront Jan 15, 2025
97b4c6e
Fix test
alec-livefront Jan 16, 2025
2e4368d
Merge branch 'main' into auth/pm-3953/generalize-copy-for-login-with-โ€ฆ
alec-livefront Jan 16, 2025
5690a4f
Merge branch 'main' into auth/pm-3953/generalize-copy-for-login-with-โ€ฆ
alec-livefront Jan 20, 2025
0d3dc6b
Merge branch 'main' into auth/pm-3953/generalize-copy-for-login-with-โ€ฆ
alec-livefront Jan 20, 2025
061c73b
Merge branch 'main' into auth/pm-3953/generalize-copy-for-login-with-โ€ฆ
alec-livefront Jan 22, 2025
bebeded
Remove space from translation
alec-livefront Jan 22, 2025
1fd1216
Add period to translation
alec-livefront Jan 22, 2025
4c97f31
Fix lint color
alec-livefront Jan 22, 2025
9644e2e
Merge branch 'main' into auth/pm-3953/generalize-copy-for-login-with-โ€ฆ
alec-livefront Jan 22, 2025
4c226c6
Fix translation punctuation
alec-livefront Jan 22, 2025
8c20318
Fix URLs for desktop and extension
alec-livefront Jan 22, 2025
bebdb9f
Update notification title
alec-livefront Jan 22, 2025
d3dacd2
Fix missing web translations
alec-livefront Jan 22, 2025
90b0da6
Merge branch 'main' into auth/pm-3953/generalize-copy-for-login-with-โ€ฆ
alec-livefront Jan 22, 2025
9dd04cd
Simplify deviceManagementUrl
alec-livefront Jan 22, 2025
75880f9
Open device management URL using href instead of click
alec-livefront Jan 23, 2025
009b796
Open device management URL using href instead of click
alec-livefront Jan 23, 2025
d5c553c
Merge branch 'main' into auth/pm-3953/generalize-copy-for-login-with-โ€ฆ
alec-livefront Jan 23, 2025
ddbad4f
Open device management URL using href instead of click
alec-livefront Jan 23, 2025
c267ef7
Add missing web translation
alec-livefront Jan 23, 2025
477510e
Remove unused translation
alec-livefront Jan 23, 2025
61e7342
Clean up usage of openExternal()
alec-livefront Jan 23, 2025
3386057
Update web unlock message
alec-livefront Jan 23, 2025
2685cdf
Merge branch 'main' into auth/pm-3953/generalize-copy-for-login-with-โ€ฆ
alec-livefront Jan 23, 2025
babdb06
Merge branch 'main' into auth/pm-3953/generalize-copy-for-login-with-โ€ฆ
alec-livefront Jan 30, 2025
42a1ba3
Merge branch 'main' into auth/pm-3953/generalize-copy-for-login-with-โ€ฆ
alec-livefront Jan 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions apps/browser/src/_locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -3105,12 +3105,18 @@
"notificationSentDevice": {
"message": "A notification has been sent to your device."
},
"notificationSentDevicePart1": {
"message": "Unlock Bitwarden on your device or on the "
alec-livefront marked this conversation as resolved.
Show resolved Hide resolved
},
"notificationSentDeviceAnchor": {
"message": "web app"
rr-bw marked this conversation as resolved.
Show resolved Hide resolved
},
"notificationSentDevicePart2": {
"message": ". Make sure the Fingerprint phrase matches the one below before approving"
alec-livefront marked this conversation as resolved.
Show resolved Hide resolved
},
"aNotificationWasSentToYourDevice": {
"message": "A notification was sent to your device"
},
"makeSureYourAccountIsUnlockedAndTheFingerprintEtc": {
"message": "Make sure your account is unlocked and the fingerprint phrase matches on the other device"
},
"youWillBeNotifiedOnceTheRequestIsApproved": {
"message": "You will be notified once the request is approved"
},
Expand All @@ -3120,6 +3126,9 @@
"loginInitiated": {
"message": "Login initiated"
},
"logInRequestSent": {
"message": "Request sent"
},
"exposedMasterPassword": {
"message": "Exposed Master Password"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ <h1 class="login-center">
<div class="content login-page">
<ng-container *ngIf="state == StateEnum.StandardAuthRequest">
<div>
<p class="lead">{{ "loginInitiated" | i18n }}</p>
<p class="lead">{{ "logInRequestSent" | i18n }}</p>

<div>
<p>{{ "notificationSentDevice" | i18n }}</p>

<p>
{{ "fingerprintMatchInfo" | i18n }}
{{ "notificationSentDevicePart1" | i18n }}
<a routerLink="/settings/security/device-management">{{
"notificationSentDeviceAnchor" | i18n
}}</a>
{{ "notificationSentDevicePart2" | i18n }}
</p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion apps/browser/src/popup/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ const routes: Routes = [
data: {
pageIcon: DevicesIcon,
pageTitle: {
key: "loginInitiated",
key: "logInRequestSent",
},
pageSubtitle: {
key: "aNotificationWasSentToYourDevice",
Expand Down
2 changes: 1 addition & 1 deletion apps/desktop/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ const routes: Routes = [
data: {
pageIcon: DevicesIcon,
pageTitle: {
key: "loginInitiated",
key: "logInRequestSent",
},
pageSubtitle: {
key: "aNotificationWasSentToYourDevice",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,15 @@ describe("DesktopLoginApprovalComponentService", () => {
it("calls ipc.auth.loginRequest with correct parameters when window is not visible", async () => {
const title = "Log in requested";
const email = "[email protected]";
const message = `Confirm login attempt for ${email}`;
const message = `Account access requested, confirm access attempt for ${email}`;
const closeText = "Close";

const loginApprovalComponent = { email } as LoginApprovalComponent;
i18nService.t.mockImplementation((key: string) => {
switch (key) {
case "logInRequested":
case "accountAccessRequested":
return title;
case "confirmLoginAtemptForMail":
case "accountAccessRequestedConfirmAccessAttempt":
return message;
case "close":
return closeText;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
import { Injectable } from "@angular/core";

import { DefaultLoginApprovalComponentService } from "@bitwarden/auth/angular";
Expand All @@ -15,12 +13,12 @@ export class DesktopLoginApprovalComponentService
super();
}

async showLoginRequestedAlertIfWindowNotVisible(email: string): Promise<void> {
async showLoginRequestedAlertIfWindowNotVisible(email?: string): Promise<void> {
const isVisible = await ipc.platform.isWindowVisible();
if (!isVisible) {
await ipc.auth.loginRequest(
this.i18nService.t("logInRequested"),
this.i18nService.t("confirmLoginAtemptForMail", email),
this.i18nService.t("accountAccessRequested"),
this.i18nService.t("accountAccessRequestedConfirmAccessAttempt", email),
this.i18nService.t("close"),
rr-bw marked this conversation as resolved.
Show resolved Hide resolved
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@
<img class="logo-image" alt="Bitwarden" />

<ng-container *ngIf="state == StateEnum.StandardAuthRequest">
<p class="lead text-center">{{ "loginInitiated" | i18n }}</p>
<p class="lead text-center">{{ "logInRequestSent" | i18n }}</p>

<div class="box last">
<div class="box-content">
<div class="box-content-row" appBoxRow>
<div class="section">
<p class="section">{{ "notificationSentDevice" | i18n }}</p>
<p>
{{ "fingerprintMatchInfo" | i18n }}
<p class="section">
{{ "notificationSentDevicePart1" | i18n }}
<a routerLink="/settings/security/device-management">{{
"notificationSentDeviceAnchor" | i18n
}}</a>
rr-bw marked this conversation as resolved.
Show resolved Hide resolved
{{ "notificationSentDevicePart2" | i18n }}
</p>
</div>

Expand Down
36 changes: 24 additions & 12 deletions apps/desktop/src/locales/en/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -2736,14 +2736,23 @@
"loginInitiated": {
"message": "Login initiated"
},
"logInRequestSent": {
"message": "Request sent"
},
"notificationSentDevice": {
"message": "A notification has been sent to your device."
},
"aNotificationWasSentToYourDevice": {
"message": "A notification was sent to your device"
},
"makeSureYourAccountIsUnlockedAndTheFingerprintEtc": {
"message": "Make sure your account is unlocked and the fingerprint phrase matches on the other device"
"notificationSentDevicePart1": {
"message": "Unlock Bitwarden on your device or on the "
},
"notificationSentDeviceAnchor": {
"message": "web app"
},
"notificationSentDevicePart2": {
"message": ". Make sure the Fingerprint phrase matches the one below before approving"
},
"needAnotherOptionV1": {
"message": "Need another option?"
Expand Down Expand Up @@ -2773,11 +2782,11 @@
"message": "Toggle character count",
"description": "'Character count' describes a feature that displays a number next to each character of the password."
},
"areYouTryingtoLogin": {
"message": "Are you trying to log in?"
"areYouTryingToAccessYourAccount": {
"message": "Are you trying to access your account?"
},
"logInAttemptBy": {
"message": "Login attempt by $EMAIL$",
"accessAttemptBy": {
"message": "Access attempt by $EMAIL$",
"placeholders": {
"email": {
"content": "$1",
Expand All @@ -2794,11 +2803,11 @@
"time": {
"message": "Time"
},
"confirmLogIn": {
"message": "Confirm login"
"confirmAccess": {
"message": "Confirm access"
},
"denyLogIn": {
"message": "Deny login"
"denyAccess": {
"message": "Deny access"
},
"logInConfirmedForEmailOnDevice": {
"message": "Login confirmed for $EMAIL$ on $DEVICE$",
Expand Down Expand Up @@ -2834,8 +2843,8 @@
"thisRequestIsNoLongerValid": {
"message": "This request is no longer valid."
},
"confirmLoginAtemptForMail": {
"message": "Confirm login attempt for $EMAIL$",
"accountAccessRequestedConfirmAccessAttempt": {
"message": "Account access requested, confirm access attempt for $EMAIL$",
rr-bw marked this conversation as resolved.
Show resolved Hide resolved
"placeholders": {
"email": {
"content": "$1",
Expand All @@ -2846,6 +2855,9 @@
"logInRequested": {
"message": "Log in requested"
},
"accountAccessRequested": {
"message": "Account access requested"
},
"creatingAccountOn": {
"message": "Creating account on"
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
<!-- Please remove this disable statement when editing this file! -->
<!-- eslint-disable tailwindcss/no-custom-classname -->
<div
class="tw-mx-auto tw-mt-5 tw-flex tw-max-w-lg tw-flex-col tw-items-center tw-justify-center tw-p-8"
>
Expand All @@ -14,15 +12,15 @@
<div
class="tw-mt-3 tw-rounded-md tw-border tw-border-solid tw-border-secondary-300 tw-bg-background tw-p-6"
>
<h2 class="tw-mb-6 tw-text-xl tw-font-semibold">{{ "loginInitiated" | i18n }}</h2>
<h2 class="tw-mb-6 tw-text-xl tw-font-semibold">{{ "logInRequestSent" | i18n }}</h2>

<div class="tw-text-light">
<p class="tw-mb-6">{{ "notificationSentDevice" | i18n }}</p>

<p class="tw-mb-6">
{{ "fingerprintMatchInfo" | i18n }}
</p>
</div>
<p class="tw-mb-6">
{{ "notificationSentDevicePart1" | i18n }}
<a routerLink="/settings/security/device-management">{{
"notificationSentDeviceAnchor" | i18n
}}</a>
{{ "notificationSentDevicePart2" | i18n }}
</p>

<div class="tw-mb-6">
<h4 class="tw-font-semibold">{{ "fingerprintPhraseHeader" | i18n }}</h4>
Expand All @@ -39,7 +37,7 @@ <h4 class="tw-font-semibold">{{ "fingerprintPhraseHeader" | i18n }}</h4>

<hr />

<div class="tw-text-light tw-mt-3">
<div class="tw-mt-3">
{{ "loginWithDeviceEnabledNote" | i18n }}
<a routerLink="/login">{{ "viewAllLoginOptions" | i18n }}</a>
</div>
Expand All @@ -52,7 +50,7 @@ <h4 class="tw-font-semibold">{{ "fingerprintPhraseHeader" | i18n }}</h4>
>
<h2 class="tw-mb-6 tw-text-xl tw-font-semibold">{{ "adminApprovalRequested" | i18n }}</h2>

<div class="tw-text-light">
<div>
<p class="tw-mb-6">{{ "adminApprovalRequestSentToAdmins" | i18n }}</p>
<p class="tw-mb-6">{{ "youWillBeNotifiedOnceApproved" | i18n }}</p>
</div>
Expand All @@ -66,7 +64,7 @@ <h4 class="tw-font-semibold">{{ "fingerprintPhraseHeader" | i18n }}</h4>

<hr />

<div class="tw-text-light tw-mt-3">
<div class="tw-mt-3">
{{ "troubleLoggingIn" | i18n }}
<a routerLink="/login-initiated">{{ "viewAllLoginOptions" | i18n }}</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/app/oss-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ const routes: Routes = [
data: {
pageIcon: DevicesIcon,
pageTitle: {
key: "loginInitiated",
key: "logInRequestSent",
},
pageSubtitle: {
key: "aNotificationWasSentToYourDevice",
Expand Down
15 changes: 12 additions & 3 deletions apps/web/src/locales/en/messages.json
rr-bw marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -1191,6 +1191,9 @@
"logInInitiated": {
"message": "Log in initiated"
},
"logInRequestSent": {
"message": "Request sent"
},
"submit": {
"message": "Submit"
},
Expand Down Expand Up @@ -1380,12 +1383,18 @@
"notificationSentDevice": {
"message": "A notification has been sent to your device."
},
"notificationSentDevicePart1": {
"message": "Unlock Bitwarden on your device or on the "
},
"notificationSentDeviceAnchor": {
"message": "web app"
},
rr-bw marked this conversation as resolved.
Show resolved Hide resolved
"notificationSentDevicePart2": {
"message": ". Make sure the Fingerprint phrase matches the one below before approving"
},
"aNotificationWasSentToYourDevice": {
"message": "A notification was sent to your device"
},
"makeSureYourAccountIsUnlockedAndTheFingerprintEtc": {
"message": "Make sure your account is unlocked and the fingerprint phrase matches on the other device"
},
"versionNumber": {
"message": "Version $VERSION_NUMBER$",
"placeholders": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<bit-dialog>
<span bitDialogTitle>{{ "areYouTryingtoLogin" | i18n }}</span>
<span bitDialogTitle>{{ "areYouTryingToAccessYourAccount" | i18n }}</span>
<ng-container bitDialogContent>
<ng-container *ngIf="loading">
<div class="tw-flex tw-items-center tw-justify-center" *ngIf="loading">
Expand All @@ -8,7 +8,7 @@
</ng-container>

<ng-container *ngIf="!loading">
<h4 class="tw-mb-3">{{ "logInAttemptBy" | i18n: email }}</h4>
<h4 class="tw-mb-3">{{ "accessAttemptBy" | i18n: email }}</h4>
rr-bw marked this conversation as resolved.
Show resolved Hide resolved
<div>
<b>{{ "fingerprintPhraseHeader" | i18n }}</b>
<p class="tw-text-code">{{ fingerprintPhrase }}</p>
Expand All @@ -35,7 +35,7 @@ <h4 class="tw-mb-3">{{ "logInAttemptBy" | i18n: email }}</h4>
[bitAction]="approveLogin"
[disabled]="loading"
>
{{ "confirmLogIn" | i18n }}
{{ "confirmAccess" | i18n }}
</button>
<button
bitButton
Expand All @@ -44,7 +44,7 @@ <h4 class="tw-mb-3">{{ "logInAttemptBy" | i18n: email }}</h4>
[bitAction]="denyLogin"
[disabled]="loading"
>
{{ "denyLogIn" | i18n }}
{{ "denyAccess" | i18n }}
</button>
</ng-container>
</bit-dialog>
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export class LoginApprovalComponent implements OnInit, OnDestroy {
}

const publicKey = Utils.fromB64ToArray(this.authRequestResponse.publicKey);
this.email = await await firstValueFrom(
this.email = await firstValueFrom(
this.accountService.activeAccount$.pipe(map((a) => a?.email)),
);
this.fingerprintPhrase = await this.authRequestService.getFingerprintPhrase(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<div class="tw-text-center">
<ng-container *ngIf="flow === Flow.StandardAuthRequest">
<p>{{ "makeSureYourAccountIsUnlockedAndTheFingerprintEtc" | i18n }}</p>
<p>
{{ "notificationSentDevicePart1" | i18n }}
<a routerLink="/settings/security/device-management">{{
"notificationSentDeviceAnchor" | i18n
}}</a>
rr-bw marked this conversation as resolved.
Show resolved Hide resolved
{{ "notificationSentDevicePart2" | i18n }}
</p>

<div class="tw-font-semibold">{{ "fingerprintPhraseHeader" | i18n }}</div>
<code class="tw-text-code">{{ fingerprintPhrase }}</code>
Expand Down
Loading