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-3970] Empty list of ciphers when logging in via fido 2 popout #6321

Merged
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export class Fido2AuthenticatorService implements Fido2AuthenticatorServiceAbstr
}

await userInterfaceSession.ensureUnlockedVault();
await this.syncService.fullSync(false);

const existingCipherIds = await this.findExcludedCredentials(
params.excludeCredentialDescriptorList
Expand Down Expand Up @@ -194,6 +195,8 @@ export class Fido2AuthenticatorService implements Fido2AuthenticatorServiceAbstr
let cipherOptions: CipherView[];

await userInterfaceSession.ensureUnlockedVault();
await this.syncService.fullSync(false);

if (params.allowCredentialDescriptorList?.length > 0) {
cipherOptions = await this.findCredentialsById(
params.allowCredentialDescriptorList,
Expand Down Expand Up @@ -296,11 +299,6 @@ export class Fido2AuthenticatorService implements Fido2AuthenticatorServiceAbstr
return [];
}

//ensure full sync has completed before getting the ciphers
if ((await this.syncService.getLastSync()) == null) {
await this.syncService.fullSync(false);
}

const ciphers = await this.cipherService.getAllDecrypted();
return ciphers
.filter(
Expand Down Expand Up @@ -331,11 +329,6 @@ export class Fido2AuthenticatorService implements Fido2AuthenticatorServiceAbstr
return [];
}

//ensure full sync has completed before getting the ciphers
if ((await this.syncService.getLastSync()) == null) {
await this.syncService.fullSync(false);
}

const ciphers = await this.cipherService.getAllDecrypted();
return ciphers.filter(
(cipher) =>
Expand All @@ -348,11 +341,6 @@ export class Fido2AuthenticatorService implements Fido2AuthenticatorServiceAbstr
}

private async findCredentialsByRp(rpId: string): Promise<CipherView[]> {
//ensure full sync has completed before getting the ciphers
if ((await this.syncService.getLastSync()) == null) {
await this.syncService.fullSync(false);
}

const ciphers = await this.cipherService.getAllDecrypted();
return ciphers.filter(
(cipher) =>
Expand Down