mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 08:13:42 +00:00
add setUserSymKeyMasterKey so we can set the encrypted user sym key from server
This commit is contained in:
@@ -180,6 +180,16 @@ export class CryptoService implements CryptoServiceAbstraction {
|
||||
: await this.stateService.setUserSymKeyBiometric(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Stores the master key encrypted user symmetric key
|
||||
* @param userSymKeyMasterKey The master key encrypted user symmetric key to set
|
||||
* @param userId The desired user
|
||||
*/
|
||||
async setUserSymKeyMasterKey(userSymKeyMasterKey: string, userId?: string): Promise<void> {
|
||||
// TODO: is this the best way to handle this from the identity token?
|
||||
await this.stateService.setUserSymKeyMasterKey(userSymKeyMasterKey, { userId: userId });
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the user's master key
|
||||
* @param key The user's master key to set
|
||||
|
||||
Reference in New Issue
Block a user