mirror of
https://github.com/bitwarden/browser
synced 2025-12-14 07:13:32 +00:00
[PM-4139] Remove approve device logins setting and enable it by default (#9495)
* Remove login with device setting and enable it by default * Remove unused i18n message
This commit is contained in:
@@ -4,7 +4,6 @@ import { firstValueFrom } from "rxjs";
|
||||
|
||||
import { LogoutReason } from "@bitwarden/auth/common";
|
||||
|
||||
import { AuthRequestServiceAbstraction } from "../../../auth/src/common/abstractions";
|
||||
import { ApiService } from "../abstractions/api.service";
|
||||
import { NotificationsService as NotificationsServiceAbstraction } from "../abstractions/notifications.service";
|
||||
import { AuthService } from "../auth/abstractions/auth.service";
|
||||
@@ -21,8 +20,7 @@ import { EnvironmentService } from "../platform/abstractions/environment.service
|
||||
import { LogService } from "../platform/abstractions/log.service";
|
||||
import { MessagingService } from "../platform/abstractions/messaging.service";
|
||||
import { StateService } from "../platform/abstractions/state.service";
|
||||
import { SyncService } from "../platform/sync/sync.service";
|
||||
import { UserId } from "../types/guid";
|
||||
import { SyncService } from "../vault/abstractions/sync/sync.service.abstraction";
|
||||
|
||||
export class NotificationsService implements NotificationsServiceAbstraction {
|
||||
private signalrConnection: signalR.HubConnection;
|
||||
@@ -41,7 +39,6 @@ export class NotificationsService implements NotificationsServiceAbstraction {
|
||||
private logoutCallback: (logoutReason: LogoutReason) => Promise<void>,
|
||||
private stateService: StateService,
|
||||
private authService: AuthService,
|
||||
private authRequestService: AuthRequestServiceAbstraction,
|
||||
private messagingService: MessagingService,
|
||||
) {
|
||||
this.environmentService.environment$.subscribe(() => {
|
||||
@@ -205,12 +202,9 @@ export class NotificationsService implements NotificationsServiceAbstraction {
|
||||
break;
|
||||
case NotificationType.AuthRequest:
|
||||
{
|
||||
const userId = await this.stateService.getUserId();
|
||||
if (await this.authRequestService.getAcceptAuthRequests(userId as UserId)) {
|
||||
this.messagingService.send("openLoginApproval", {
|
||||
notificationId: notification.payload.id,
|
||||
});
|
||||
}
|
||||
this.messagingService.send("openLoginApproval", {
|
||||
notificationId: notification.payload.id,
|
||||
});
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user