Skip to content

Commit 45f2104

Browse files
authored
fix: broken SDK interface (#14959)
1 parent a6e2012 commit 45f2104

File tree

3 files changed

+16
-6
lines changed

3 files changed

+16
-6
lines changed

libs/common/src/platform/services/sdk/default-sdk.service.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,15 @@ export class DefaultSdkService implements SdkService {
152152
const settings = this.toSettings(env);
153153
const client = await this.sdkClientFactory.createSdkClient(settings);
154154

155-
await this.initializeClient(client, account, kdfParams, privateKey, userKey, orgKeys);
155+
await this.initializeClient(
156+
userId,
157+
client,
158+
account,
159+
kdfParams,
160+
privateKey,
161+
userKey,
162+
orgKeys,
163+
);
156164

157165
return client;
158166
};
@@ -182,6 +190,7 @@ export class DefaultSdkService implements SdkService {
182190
}
183191

184192
private async initializeClient(
193+
userId: UserId,
185194
client: BitwardenClient,
186195
account: AccountInfo,
187196
kdfParams: KdfConfig,
@@ -190,6 +199,7 @@ export class DefaultSdkService implements SdkService {
190199
orgKeys: Record<OrganizationId, EncryptedOrganizationKeyData> | null,
191200
) {
192201
await client.crypto().initialize_user_crypto({
202+
userId,
193203
email: account.email,
194204
method: { decryptedKey: { decrypted_user_key: userKey.keyB64 } },
195205
kdfParams:

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@
159159
"@angular/platform-browser": "18.2.13",
160160
"@angular/platform-browser-dynamic": "18.2.13",
161161
"@angular/router": "18.2.13",
162-
"@bitwarden/sdk-internal": "0.2.0-main.168",
162+
"@bitwarden/sdk-internal": "0.2.0-main.177",
163163
"@electron/fuses": "1.8.0",
164164
"@emotion/css": "11.13.5",
165165
"@koa/multer": "3.1.0",

0 commit comments

Comments
 (0)