unsetLocalKey

This commit is contained in:
Riccardo Balbo 2024-10-16 12:51:56 +02:00 committed by k00b
parent de0eb8a52c
commit 41b86c8251
1 changed files with 6 additions and 0 deletions

View File

@ -131,6 +131,12 @@ export function useVaultMigration () {
return migrate
}
export async function unsetLocalKey (userId) {
const config = await openConfig(userId)
await config.unset('key')
await config.close()
}
/**
* A react hook to use the vault for a specific owner entity and key
* It will automatically handle the vault lifecycle and value updates