Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

Add required backup key return fields for GET backup key

Tuan Dang6f9006440039
diff --git a/backend/src/controllers/passwordController.ts b/backend/src/controllers/passwordController.ts
index 0109dc6a51..b029bc0bee 100644
--- a/backend/src/controllers/passwordController.ts
+++ b/backend/src/controllers/passwordController.ts
@@ -309,7 +309,7 @@ export const getBackupPrivateKey = async (req: Request, res: Response) => {
try {
backupPrivateKey = await BackupPrivateKey.findOne({
user: req.user._id
- });
+ }).select('+encryptedPrivateKey +iv +tag');
if (!backupPrivateKey) throw new Error('Failed to find backup private key');
} catch (err) {