diff --git a/apps/desktop/src/autofill/modal/credentials/fido2-create.component.ts b/apps/desktop/src/autofill/modal/credentials/fido2-create.component.ts index 9edea2764e0..e3e0fba73fa 100644 --- a/apps/desktop/src/autofill/modal/credentials/fido2-create.component.ts +++ b/apps/desktop/src/autofill/modal/credentials/fido2-create.component.ts @@ -177,6 +177,7 @@ export class Fido2CreateComponent implements OnInit, OnDestroy { const allCiphers = await this.cipherService.getAllDecrypted(activeUserId); return allCiphers.filter( (cipher) => + cipher != null && cipher.type == CipherType.Login && cipher.login?.matchesUri(rpid, equivalentDomains) && Fido2Utils.cipherHasNoOtherPasskeys(cipher, userHandle) && diff --git a/apps/desktop/src/autofill/services/desktop-autofill.service.ts b/apps/desktop/src/autofill/services/desktop-autofill.service.ts index f4b60064a3b..c2f81252145 100644 --- a/apps/desktop/src/autofill/services/desktop-autofill.service.ts +++ b/apps/desktop/src/autofill/services/desktop-autofill.service.ts @@ -89,7 +89,7 @@ export class DesktopAutofillService implements OnDestroy { ) .subscribe(); - // Listen for sign out to clear credentials? + // Listen for sign out to clear credentials this.authService.activeAccountStatus$ .pipe( filter((status) => status === AuthenticationStatus.LoggedOut), @@ -102,7 +102,7 @@ export class DesktopAutofillService implements OnDestroy { } async adHocSync(): Promise { - this.logService.info("Performing AdHoc sync"); + this.logService.debug("Performing AdHoc sync"); const account = await firstValueFrom(this.accountService.activeAccount$); const userId = account?.id; @@ -442,12 +442,10 @@ export class DesktopAutofillService implements OnDestroy { } function normalizePosition(position: { x: number; y: number }): { x: number; y: number } { - // if macOS, the position we're sending is too far left and too far down. - // It's the left bottom corner of the parent window. - // so we need to add half of the estimated width of the nativeOS dialog to the x position - // and remove half of the estimated height of the nativeOS dialog to the y position. + // If macOS, the position we're sending is too far left. + // Add 100 pixels to the x-coordinate to offset the native OS dialog positioning. return { - x: Math.round(position.x + 100), // add half of estimated width of the nativeOS dialog - y: Math.round(position.y), // remove half of estimated height of the nativeOS dialog + x: Math.round(position.x + 100), // Offset for native dialog positioning + y: Math.round(position.y), }; } diff --git a/apps/desktop/src/autofill/services/desktop-fido2-user-interface.service.ts b/apps/desktop/src/autofill/services/desktop-fido2-user-interface.service.ts index 8b64e448738..2ac51781e9a 100644 --- a/apps/desktop/src/autofill/services/desktop-fido2-user-interface.service.ts +++ b/apps/desktop/src/autofill/services/desktop-fido2-user-interface.service.ts @@ -233,7 +233,7 @@ export class DesktopFido2UserInterfaceSession implements Fido2UserInterfaceSessi await this.updateCredential(this.updatedCipher); return { cipherId: this.updatedCipher.id, userVerified: userVerification }; } else { - // Create the credential + // Create the cipher const createdCipher = await this.createCipher({ credentialName, userName, @@ -273,7 +273,7 @@ export class DesktopFido2UserInterfaceSession implements Fido2UserInterfaceSessi } /** - * Can be called by the UI to create a new credential with user input etc. + * Can be called by the UI to create a new cipher with user input etc. * @param param0 */ async createCipher({ credentialName, userName, rpId }: NewCredentialParams): Promise {