@1auth/authn
Advanced tools
Comparing version 0.0.0-alpha.47 to 0.0.0-alpha.48
17
index.js
@@ -48,3 +48,3 @@ import { setTimeout } from 'node:timers/promises' | ||
const now = nowInSeconds() | ||
for (let i = credentials.length; i--;) { | ||
for (let i = credentials.length; i--; ) { | ||
const credential = credentials[i] | ||
@@ -75,3 +75,3 @@ if (credential.expire && credential.expire < now) { | ||
const list = [] | ||
for (let i = items.length; i--;) { | ||
for (let i = items.length; i--; ) { | ||
const item = items[i] | ||
@@ -286,2 +286,15 @@ // TODO need filter for expire | ||
export const select = async (credentialOptions, sub, id) => { | ||
const type = makeType(credentialOptions) | ||
const item = await options.store.select(options.table, { id, type, sub }) | ||
const { encryptionKey: encryptedKey } = item | ||
delete item.encryptionKey | ||
const decryptedItem = symmetricDecryptFields( | ||
item, | ||
{ encryptedKey, sub }, | ||
options.encryptedFields | ||
) | ||
return decryptedItem | ||
} | ||
// TODO manage onboard state | ||
@@ -288,0 +301,0 @@ |
{ | ||
"name": "@1auth/authn", | ||
"version": "0.0.0-alpha.47", | ||
"version": "0.0.0-alpha.48", | ||
"description": "", | ||
@@ -53,4 +53,4 @@ "type": "module", | ||
"dependencies": { | ||
"@1auth/crypto": "0.0.0-alpha.47" | ||
"@1auth/crypto": "0.0.0-alpha.48" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8845
276
+ Added@1auth/crypto@0.0.0-alpha.48(transitive)
- Removed@1auth/crypto@0.0.0-alpha.47(transitive)
Updated@1auth/crypto@0.0.0-alpha.48