1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 16:53:34 +00:00

[deps] Autofill: Update prettier to v3 (#7014)

* [deps] Autofill: Update prettier to v3

* prettier formatting updates

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Prusik <jprusik@classynemesis.com>
This commit is contained in:
renovate[bot]
2023-11-29 16:15:20 -05:00
committed by GitHub
parent 4ff5f38e89
commit 28de9439be
1145 changed files with 5898 additions and 5612 deletions

View File

@@ -83,7 +83,7 @@ export class LoginViaAuthRequestComponent
private stateService: StateService,
private loginService: LoginService,
private deviceTrustCryptoService: DeviceTrustCryptoServiceAbstraction,
private authReqCryptoService: AuthRequestCryptoServiceAbstraction
private authReqCryptoService: AuthRequestCryptoServiceAbstraction,
) {
super(environmentService, i18nService, platformUtilsService);
@@ -183,7 +183,7 @@ export class LoginViaAuthRequestComponent
// Re-derive the user's fingerprint phrase
// It is important to not use the server's public key here as it could have been compromised via MITM
const derivedPublicKeyArrayBuffer = await this.cryptoFunctionService.rsaExtractPublicKey(
adminAuthReqStorable.privateKey
adminAuthReqStorable.privateKey,
);
this.fingerprintPhrase = (
await this.cryptoService.getFingerprint(this.email, derivedPublicKeyArrayBuffer)
@@ -198,7 +198,7 @@ export class LoginViaAuthRequestComponent
if (adminAuthReqResponse.requestApproved) {
return await this.handleApprovedAdminAuthRequest(
adminAuthReqResponse,
adminAuthReqStorable.privateKey
adminAuthReqStorable.privateKey,
);
}
@@ -236,7 +236,7 @@ export class LoginViaAuthRequestComponent
deviceIdentifier,
publicKey,
authRequestType,
accessCode
accessCode,
);
}
@@ -283,7 +283,7 @@ export class LoginViaAuthRequestComponent
// Unauthed - access code required for user verification
authReqResponse = await this.apiService.getAuthResponse(
requestId,
this.authRequest.accessCode
this.authRequest.accessCode,
);
break;
@@ -321,7 +321,7 @@ export class LoginViaAuthRequestComponent
if (this.userAuthNStatus === AuthenticationStatus.Locked) {
return await this.handleApprovedAdminAuthRequest(
authReqResponse,
this.authRequestKeyPair.privateKey
this.authRequestKeyPair.privateKey,
);
}
@@ -346,7 +346,7 @@ export class LoginViaAuthRequestComponent
async handleApprovedAdminAuthRequest(
adminAuthReqResponse: AuthRequestResponse,
privateKey: ArrayBuffer
privateKey: ArrayBuffer,
) {
// See verifyAndHandleApprovedAuthReq(...) for flow details
// it's flow 2 or 3 based on presence of masterPasswordHash
@@ -355,14 +355,14 @@ export class LoginViaAuthRequestComponent
// key is authRequestPublicKey(masterKey) + we have authRequestPublicKey(masterPasswordHash)
await this.authReqCryptoService.setKeysAfterDecryptingSharedMasterKeyAndHash(
adminAuthReqResponse,
privateKey
privateKey,
);
} else {
// Flow 3: masterPasswordHash is null
// we can assume key is authRequestPublicKey(userKey) and we can just decrypt with userKey and proceed to vault
await this.authReqCryptoService.setUserKeyAfterDecryptingSharedUserKey(
adminAuthReqResponse,
privateKey
privateKey,
);
}
@@ -384,7 +384,7 @@ export class LoginViaAuthRequestComponent
// Authentication helper
private async buildAuthRequestLoginCredentials(
requestId: string,
response: AuthRequestResponse
response: AuthRequestResponse,
): Promise<AuthRequestLoginCredentials> {
// if masterPasswordHash has a value, we will always receive key as authRequestPublicKey(masterKey) + authRequestPublicKey(masterPasswordHash)
// if masterPasswordHash is null, we will always receive key as authRequestPublicKey(userKey)
@@ -393,7 +393,7 @@ export class LoginViaAuthRequestComponent
await this.authReqCryptoService.decryptPubKeyEncryptedMasterKeyAndHash(
response.key,
response.masterPasswordHash,
this.authRequestKeyPair.privateKey
this.authRequestKeyPair.privateKey,
);
return new AuthRequestLoginCredentials(
@@ -402,12 +402,12 @@ export class LoginViaAuthRequestComponent
requestId,
null, // no userKey
masterKey,
masterKeyHash
masterKeyHash,
);
} else {
const userKey = await this.authReqCryptoService.decryptPubKeyEncryptedUserKey(
response.key,
this.authRequestKeyPair.privateKey
this.authRequestKeyPair.privateKey,
);
return new AuthRequestLoginCredentials(
this.email,
@@ -415,14 +415,14 @@ export class LoginViaAuthRequestComponent
requestId,
userKey,
null, // no masterKey
null // no masterKeyHash
null, // no masterKeyHash
);
}
}
private async loginViaAuthRequestStrategy(
requestId: string,
authReqResponse: AuthRequestResponse
authReqResponse: AuthRequestResponse,
): Promise<AuthResult> {
// Note: credentials change based on if the authReqResponse.key is a encryptedMasterKey or UserKey
const credentials = await this.buildAuthRequestLoginCredentials(requestId, authReqResponse);