@1auth/messenger
Advanced tools
Comparing version 0.0.0-alpha.47 to 0.0.0-alpha.48
19
index.js
@@ -82,3 +82,3 @@ import { | ||
}) | ||
for (let i = messengers.length; i--;) { | ||
for (let i = messengers.length; i--; ) { | ||
const { encryptionKey: encryptedKey, sub } = messengers[i] | ||
@@ -204,2 +204,19 @@ delete messengers[i].encryptionKey | ||
export const select = async (type, sub, id) => { | ||
const res = await options.store.select(options.table, { | ||
type, | ||
sub, | ||
id | ||
}) | ||
if (!res?.verify) return | ||
const { encryptionKey: encryptedKey } = res | ||
delete res.encryptionKey | ||
const decryptedValues = symmetricDecryptFields( | ||
res, | ||
{ encryptedKey, sub }, | ||
options.encryptedFields | ||
) | ||
return decryptedValues | ||
} | ||
const nowInSeconds = () => Math.floor(Date.now() / 1000) |
{ | ||
"name": "@1auth/messenger", | ||
"version": "0.0.0-alpha.47", | ||
"version": "0.0.0-alpha.48", | ||
"description": "", | ||
@@ -53,5 +53,5 @@ "type": "module", | ||
"dependencies": { | ||
"@1auth/authn": "0.0.0-alpha.47", | ||
"@1auth/crypto": "0.0.0-alpha.47" | ||
"@1auth/authn": "0.0.0-alpha.48", | ||
"@1auth/crypto": "0.0.0-alpha.48" | ||
} | ||
} |
6434
202
+ Added@1auth/authn@0.0.0-alpha.48(transitive)
+ Added@1auth/crypto@0.0.0-alpha.48(transitive)
- Removed@1auth/authn@0.0.0-alpha.47(transitive)
- Removed@1auth/crypto@0.0.0-alpha.47(transitive)
Updated@1auth/authn@0.0.0-alpha.48
Updated@1auth/crypto@0.0.0-alpha.48