-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auth/PM-16947 - Web - Device Management - Add Manage Auth Requests su…
…pport (#12809) * PM-16947 - JsLibServices - register default DefaultLoginApprovalComponentService * PM-16947 - DeviceResponse - add interface for DevicePendingAuthRequest * PM-16947 - Web translations - migrate all LoginApprovalComponent translations from desktop to web * PM-16947 - LoginApprovalComp - (1) Add loading state (2) Refactor to return proper boolean results (3) Don't create race condition by trying to respond to the close event in the dialog and re-sending responses upon approve or deny click * PM-16947 - DeviceManagementComponent - added support for approving and denying auth requests. * PM-16947 - LoginApprovalComp - Add validation error * PM-16947 - LoginApprovalComponent - remove validation service for now. * PM-16947 - Re add validation * PM-16947 - Fix LoginApprovalComponent tests
- Loading branch information
1 parent
d252337
commit 1fcdf25
Showing
8 changed files
with
178 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3813,6 +3813,67 @@ | |
"trusted": { | ||
"message": "Trusted" | ||
}, | ||
"needsApproval": { | ||
"message": "Needs approval" | ||
}, | ||
"areYouTryingtoLogin": { | ||
"message": "Are you trying to log in?" | ||
}, | ||
"logInAttemptBy": { | ||
"message": "Login attempt by $EMAIL$", | ||
"placeholders": { | ||
"email": { | ||
"content": "$1", | ||
"example": "[email protected]" | ||
} | ||
} | ||
}, | ||
"deviceType": { | ||
"message": "Device Type" | ||
}, | ||
"ipAddress": { | ||
"message": "IP Address" | ||
}, | ||
"confirmLogIn": { | ||
"message": "Confirm login" | ||
}, | ||
"denyLogIn": { | ||
"message": "Deny login" | ||
}, | ||
"thisRequestIsNoLongerValid": { | ||
"message": "This request is no longer valid." | ||
}, | ||
"logInConfirmedForEmailOnDevice": { | ||
"message": "Login confirmed for $EMAIL$ on $DEVICE$", | ||
"placeholders": { | ||
"email": { | ||
"content": "$1", | ||
"example": "[email protected]" | ||
}, | ||
"device": { | ||
"content": "$2", | ||
"example": "iOS" | ||
} | ||
} | ||
}, | ||
"youDeniedALogInAttemptFromAnotherDevice": { | ||
"message": "You denied a login attempt from another device. If this really was you, try to log in with the device again." | ||
}, | ||
"loginRequestHasAlreadyExpired": { | ||
"message": "Login request has already expired." | ||
}, | ||
"justNow": { | ||
"message": "Just now" | ||
}, | ||
"requestedXMinutesAgo": { | ||
"message": "Requested $MINUTES$ minutes ago", | ||
"placeholders": { | ||
"minutes": { | ||
"content": "$1", | ||
"example": "5" | ||
} | ||
} | ||
}, | ||
"creatingAccountOn": { | ||
"message": "Creating account on" | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ import { AuthRequestResponse } from "@bitwarden/common/auth/models/response/auth | |
import { AppIdService } from "@bitwarden/common/platform/abstractions/app-id.service"; | ||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service"; | ||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service"; | ||
import { ValidationService } from "@bitwarden/common/platform/abstractions/validation.service"; | ||
import { UserId } from "@bitwarden/common/types/guid"; | ||
import { ToastService } from "@bitwarden/components"; | ||
import { KeyService } from "@bitwarden/key-management"; | ||
|
@@ -29,6 +30,7 @@ describe("LoginApprovalComponent", () => { | |
let i18nService: MockProxy<I18nService>; | ||
let dialogRef: MockProxy<DialogRef>; | ||
let toastService: MockProxy<ToastService>; | ||
let validationService: MockProxy<ValidationService>; | ||
|
||
const testNotificationId = "test-notification-id"; | ||
const testEmail = "[email protected]"; | ||
|
@@ -41,6 +43,7 @@ describe("LoginApprovalComponent", () => { | |
i18nService = mock<I18nService>(); | ||
dialogRef = mock<DialogRef>(); | ||
toastService = mock<ToastService>(); | ||
validationService = mock<ValidationService>(); | ||
|
||
accountService.activeAccount$ = of({ | ||
email: testEmail, | ||
|
@@ -62,6 +65,7 @@ describe("LoginApprovalComponent", () => { | |
{ provide: KeyService, useValue: mock<KeyService>() }, | ||
{ provide: DialogRef, useValue: dialogRef }, | ||
{ provide: ToastService, useValue: toastService }, | ||
{ provide: ValidationService, useValue: validationService }, | ||
{ | ||
provide: LoginApprovalComponentServiceAbstraction, | ||
useValue: mock<LoginApprovalComponentServiceAbstraction>(), | ||
|
Oops, something went wrong.