mirror of
https://github.com/bitwarden/browser
synced 2026-02-10 05:30:01 +00:00
Merge branch 'autofill/PM-9034-implement-passkey-for-unlocked-accounts' into autofill/PM-17444-use-reprompt
This commit is contained in:
@@ -60,10 +60,6 @@ export class DesktopAutofillService implements OnDestroy {
|
||||
.pipe(
|
||||
distinctUntilChanged(),
|
||||
switchMap((enabled) => {
|
||||
/* if (!enabled) {
|
||||
return EMPTY;
|
||||
} */
|
||||
|
||||
return this.accountService.activeAccount$.pipe(
|
||||
map((account) => account?.id),
|
||||
filter((userId): userId is UserId => userId != null),
|
||||
|
||||
@@ -160,7 +160,6 @@ export class DesktopFido2UserInterfaceSession implements Fido2UserInterfaceSessi
|
||||
this.rpId.pipe(
|
||||
filter((id) => id != null),
|
||||
take(1),
|
||||
timeout(5000), // 5 seconds timeout
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { BitwardenShield } from "@bitwarden/auth/angular";
|
||||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
||||
import { DomainSettingsService } from "@bitwarden/common/autofill/services/domain-settings.service";
|
||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||
import {
|
||||
@@ -22,14 +23,12 @@ import {
|
||||
BitIconButtonComponent,
|
||||
} from "@bitwarden/components";
|
||||
import { PasswordRepromptService } from "@bitwarden/vault";
|
||||
// import { SearchComponent } from "@bitwarden/components/src/search/search.component";
|
||||
|
||||
import {
|
||||
DesktopFido2UserInterfaceService,
|
||||
DesktopFido2UserInterfaceSession,
|
||||
} from "../../../autofill/services/desktop-fido2-user-interface.service";
|
||||
import { DesktopSettingsService } from "../../../platform/services/desktop-settings.service";
|
||||
// import { AnchorLinkDirective } from "../../../../../libs/components/src/link/link.directive";
|
||||
|
||||
@Component({
|
||||
standalone: true,
|
||||
@@ -46,7 +45,6 @@ import { DesktopSettingsService } from "../../../platform/services/desktop-setti
|
||||
SectionComponent,
|
||||
ItemModule,
|
||||
BadgeModule,
|
||||
// SearchComponent,
|
||||
],
|
||||
templateUrl: "fido2-create.component.html",
|
||||
})
|
||||
@@ -63,6 +61,7 @@ export class Fido2CreateComponent implements OnInit {
|
||||
private readonly cipherService: CipherService,
|
||||
private readonly dialogService: DialogService,
|
||||
private readonly domainSettingsService: DomainSettingsService,
|
||||
private readonly logService: LogService,
|
||||
private readonly passwordRepromptService: PasswordRepromptService,
|
||||
private readonly router: Router,
|
||||
) {}
|
||||
@@ -92,9 +91,7 @@ export class Fido2CreateComponent implements OnInit {
|
||||
});
|
||||
this.ciphersSubject.next(relevantCiphers);
|
||||
})
|
||||
.catch(() => {
|
||||
// console.error(err);
|
||||
});
|
||||
.catch((error) => this.logService.error(error));
|
||||
}
|
||||
|
||||
async addPasskeyToCipher(cipher: CipherView) {
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
import { CommonModule } from "@angular/common";
|
||||
import { Component, OnInit, OnDestroy } from "@angular/core";
|
||||
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
||||
import { RouterModule, Router } from "@angular/router";
|
||||
import { firstValueFrom, map, BehaviorSubject, Observable } from "rxjs";
|
||||
|
||||
import { JslibModule } from "@bitwarden/angular/jslib.module";
|
||||
import { BitwardenShield } from "@bitwarden/auth/angular";
|
||||
import { AccountService } from "@bitwarden/common/auth/abstractions/account.service";
|
||||
import { LogService } from "@bitwarden/common/platform/abstractions/log.service";
|
||||
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
|
||||
import { CipherRepromptType } from "@bitwarden/common/vault/enums";
|
||||
import { CipherView } from "@bitwarden/common/vault/models/view/cipher.view";
|
||||
@@ -59,6 +61,7 @@ export class Fido2VaultComponent implements OnInit, OnDestroy {
|
||||
private readonly fido2UserInterfaceService: DesktopFido2UserInterfaceService,
|
||||
private readonly cipherService: CipherService,
|
||||
private readonly accountService: AccountService,
|
||||
private readonly logService: LogService,
|
||||
private readonly passwordRepromptService: PasswordRepromptService,
|
||||
private readonly router: Router,
|
||||
) {}
|
||||
@@ -71,16 +74,13 @@ export class Fido2VaultComponent implements OnInit, OnDestroy {
|
||||
this.session = this.fido2UserInterfaceService.getCurrentSession();
|
||||
this.cipherIds$ = this.session?.availableCipherIds$;
|
||||
|
||||
// eslint-disable-next-line rxjs-angular/prefer-takeuntil
|
||||
this.cipherIds$.subscribe((cipherIds) => {
|
||||
this.cipherIds$.pipe(takeUntilDestroyed()).subscribe((cipherIds) => {
|
||||
this.cipherService
|
||||
.getAllDecryptedForIds(activeUserId, cipherIds || [])
|
||||
.then((ciphers) => {
|
||||
this.ciphersSubject.next(ciphers);
|
||||
})
|
||||
.catch(() => {
|
||||
// console.error(err);
|
||||
});
|
||||
.catch((error) => this.logService.error(error));
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user