mirror of
https://github.com/Lifeforge-app/lifeforge.git
synced 2026-06-28 14:55:45 +00:00
fix(server): decrypt api key master password before hashing in createOrUpdate mutation
This commit is contained in:
@@ -33,7 +33,9 @@ const createOrUpdate = forgeController
|
||||
.callback(async ({ pb, body: { password } }) => {
|
||||
const salt = await bcrypt.genSalt(10)
|
||||
|
||||
const APIKeysMasterPasswordHash = await bcrypt.hash(password, salt)
|
||||
const decryptedMaster = decrypt2(password, challenge)
|
||||
|
||||
const APIKeysMasterPasswordHash = await bcrypt.hash(decryptedMaster, salt)
|
||||
|
||||
const id = pb.instance.authStore.record!.id
|
||||
|
||||
|
||||
Reference in New Issue
Block a user