mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
fix: broken SDK interface (#14959)
This commit is contained in:
@@ -152,7 +152,15 @@ export class DefaultSdkService implements SdkService {
|
||||
const settings = this.toSettings(env);
|
||||
const client = await this.sdkClientFactory.createSdkClient(settings);
|
||||
|
||||
await this.initializeClient(client, account, kdfParams, privateKey, userKey, orgKeys);
|
||||
await this.initializeClient(
|
||||
userId,
|
||||
client,
|
||||
account,
|
||||
kdfParams,
|
||||
privateKey,
|
||||
userKey,
|
||||
orgKeys,
|
||||
);
|
||||
|
||||
return client;
|
||||
};
|
||||
@@ -182,6 +190,7 @@ export class DefaultSdkService implements SdkService {
|
||||
}
|
||||
|
||||
private async initializeClient(
|
||||
userId: UserId,
|
||||
client: BitwardenClient,
|
||||
account: AccountInfo,
|
||||
kdfParams: KdfConfig,
|
||||
@@ -190,6 +199,7 @@ export class DefaultSdkService implements SdkService {
|
||||
orgKeys: Record<OrganizationId, EncryptedOrganizationKeyData> | null,
|
||||
) {
|
||||
await client.crypto().initialize_user_crypto({
|
||||
userId,
|
||||
email: account.email,
|
||||
method: { decryptedKey: { decrypted_user_key: userKey.keyB64 } },
|
||||
kdfParams:
|
||||
|
||||
Reference in New Issue
Block a user