clients
clients copied to clipboard
SG-173 - Login device approval desktop
Type of change
- [ ] Bug fix
- [X] New feature development
- [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc)
- [ ] Build/deploy pipeline (DevOps)
- [ ] Other
Objective
Approve or deny login requests from other devices in the desktop app if the setting is enabled.
Code changes
- login-approval.component.html: Request presentation as a modal with two buttons that can be dismissed by clicking outside it's area.
- apps/desktop/src/app/accounts/login/login-approval.component.ts: Component that controls the modal presentation and handles the deny or approve request flow.
- apps/desktop/src/app/accounts/settings.component.html apps/desktop/src/app/accounts/settings.component.ts libs/common/src/abstractions/state.service.ts libs/common/src/services/state.service.ts: New setting that enables/disables the presentation of requests.
- apps/desktop/src/app/app.component.ts: Upon receiving a new message opens the login approval modal.
- apps/desktop/src/app/vault/vault.component.ts: If the setting login request is enabled fetch valid login requests after login.
- apps/desktop/src/services/electron-main-messaging.service.ts: Added handler for new message "loginRequest" that creates desktop alert.
- libs/common/src/abstractions/api.service.ts libs/common/src/services/api.service.ts: Implemented required services for this feature.
- libs/common/src/abstractions/auth.service.ts libs/common/src/services/auth.service.ts: Implemented service to authorise login on requested device.
- libs/common/src/services/notifications.service.ts: Handles new notification type.
Screenshots
Before you submit
- Please add unit tests where it makes sense to do so (encouraged but not required)
- If this change requires a documentation update - notify the documentation team
- If this change has particular deployment requirements - notify the DevOps team
@LRNcardozoWDF there are build errors for Browser, Desktop, and CLI for what appears to be a missing service injection