mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 00:40:14 +01:00
🕸️ refactor: Migrate from crypto to Web Crypto API (#3357)
* move crypto to async webcrypto update encrypt/decrypt forgot await * chore: import order - openidStrategy.js * chore: import order - Session.js * chore: import order - AuthController.js * Update AuthService.js --------- Co-authored-by: Danny Avila <danacordially@gmail.com>
This commit is contained in:
parent
b6fe7e5570
commit
3e0f95458f
10 changed files with 108 additions and 51 deletions
|
|
@ -50,7 +50,7 @@ const getUserKey = async ({ userId, name }) => {
|
|||
}),
|
||||
);
|
||||
}
|
||||
return decrypt(keyValue.value);
|
||||
return await decrypt(keyValue.value);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -109,7 +109,7 @@ const getUserKeyExpiry = async ({ userId, name }) => {
|
|||
* after encrypting the provided value. It sets the provided expiry date for the key.
|
||||
*/
|
||||
const updateUserKey = async ({ userId, name, value, expiresAt = null }) => {
|
||||
const encryptedValue = encrypt(value);
|
||||
const encryptedValue = await encrypt(value);
|
||||
let updateObject = {
|
||||
userId,
|
||||
name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue