From b5e64bc8b8f76ef086c051bd7ff23b21b4dd984f Mon Sep 17 00:00:00 2001 From: Daniel Hougaard <62331820+DanielHougaard@users.noreply.github.com> Date: Wed, 14 Feb 2024 00:15:17 +0100 Subject: [PATCH] Update srp.ts --- backend/src/lib/crypto/srp.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/src/lib/crypto/srp.ts b/backend/src/lib/crypto/srp.ts index 6f4588e3f..d0d290be1 100644 --- a/backend/src/lib/crypto/srp.ts +++ b/backend/src/lib/crypto/srp.ts @@ -8,6 +8,10 @@ import { TUserEncryptionKeys } from "@app/db/schemas"; import { decryptSymmetric, encryptAsymmetric, encryptSymmetric } from "./encryption"; +// Importing the argon2 constants from the argon2 module fails due to an issue with importing commonjs modules. +// Read more: https://stackoverflow.com/questions/70605320/named-export-types-not-found-the-requested-module-mongoose-is-a-commonjs-mo +const ARGON_2_ID = 2; + export const generateSrpServerKey = async (salt: string, verifier: string) => { // eslint-disable-next-line new-cap const server = new jsrp.server();