diff --git a/src/handlers/sync.ts b/src/handlers/sync.ts index f013e35..d6a8f8f 100644 --- a/src/handlers/sync.ts +++ b/src/handlers/sync.ts @@ -112,16 +112,18 @@ export async function handleSync(request: Request, env: Env, userId: string): Pr }, policies: [], sends: [], - userDecryption: { - masterPasswordUnlock: { - salt: user.email, - kdf: { - kdfType: user.kdfType, - iterations: user.kdfIterations, - memory: user.kdfMemory || null, - parallelism: user.kdfParallelism || null, + UserDecryptionOptions: { + HasMasterPassword: true, + Object: 'userDecryptionOptions', + MasterPasswordUnlock: { + Kdf: { + KdfType: user.kdfType, + Iterations: user.kdfIterations, + Memory: user.kdfMemory || null, + Parallelism: user.kdfParallelism || null, }, - masterKeyEncryptedUserKey: user.key, + MasterKeyEncryptedUserKey: user.key, + Salt: user.email, }, }, object: 'sync', diff --git a/src/types/index.ts b/src/types/index.ts index f819372..46c10b9 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -273,6 +273,6 @@ export interface SyncResponse { domains: any; policies: any[]; sends: any[]; - userDecryption: any | null; + UserDecryptionOptions: UserDecryptionOptions | null; object: string; }