@auth/dynamodb-adapter
Advanced tools
Comparing version 1.0.12 to 1.0.13
14
index.js
@@ -380,7 +380,10 @@ /** | ||
return null; | ||
const { pk, sk } = data.Items[0]; | ||
const sessionRecord = data.Items[0]; | ||
const { UpdateExpression, ExpressionAttributeNames, ExpressionAttributeValues, } = generateUpdateExpression(session); | ||
const res = await client.update({ | ||
TableName, | ||
Key: { pk, sk }, | ||
Key: { | ||
[pk]: sessionRecord[pk], | ||
[sk]: sessionRecord[sk], | ||
}, | ||
UpdateExpression, | ||
@@ -409,6 +412,9 @@ ExpressionAttributeNames, | ||
return null; | ||
const { pk, sk } = data.Items[0]; | ||
const sessionRecord = data.Items[0]; | ||
const res = await client.delete({ | ||
TableName, | ||
Key: { pk, sk }, | ||
Key: { | ||
[pk]: sessionRecord[pk], | ||
[sk]: sessionRecord[sk], | ||
}, | ||
ReturnValues: "ALL_OLD", | ||
@@ -415,0 +421,0 @@ }); |
@@ -0,1 +1,6 @@ | ||
import config from "utils/adapter/jest-preset.js" | ||
import path from 'node:path' | ||
process.env.JEST_DYNAMODB_CONFIG = path.resolve('./jest-dynamodb-config.cjs'); | ||
/* | ||
@@ -5,4 +10,4 @@ * For a detailed explanation regarding each configuration property and type check, visit: | ||
*/ | ||
module.exports = { | ||
...require("@next-auth/adapter-test/jest/jest-preset"), | ||
export default { | ||
...config, | ||
// // Indicates whether the coverage information should be collected while executing the test | ||
@@ -9,0 +14,0 @@ // collectCoverage: true, |
{ | ||
"name": "@auth/dynamodb-adapter", | ||
"repository": "https://github.com/nextauthjs/next-auth", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "AWS DynamoDB adapter for next-auth.", | ||
@@ -45,6 +45,6 @@ "keywords": [ | ||
"@aws-sdk/lib-dynamodb": "^3.36.1", | ||
"@shelf/jest-dynamodb": "^2.1.0" | ||
"@shelf/jest-dynamodb": "^3.4.2" | ||
}, | ||
"dependencies": { | ||
"@auth/core": "0.19.0" | ||
"@auth/core": "0.19.1" | ||
}, | ||
@@ -51,0 +51,0 @@ "scripts": { |
@@ -28,2 +28,2 @@ <p align="center"> | ||
Check out the documentation at [authjs.dev](https://authjs.dev/reference/adapter/dynamodb). | ||
Check out the documentation at [authjs.dev](https://authjs.dev/reference/adapter/dynamodb). |
@@ -409,3 +409,3 @@ /** | ||
if (!data.Items?.length) return null | ||
const { pk, sk } = data.Items[0] as any | ||
const sessionRecord = data.Items[0] | ||
const { | ||
@@ -418,3 +418,6 @@ UpdateExpression, | ||
TableName, | ||
Key: { pk, sk }, | ||
Key: { | ||
[pk]: sessionRecord[pk], | ||
[sk]: sessionRecord[sk], | ||
}, | ||
UpdateExpression, | ||
@@ -443,7 +446,10 @@ ExpressionAttributeNames, | ||
const { pk, sk } = data.Items[0] | ||
const sessionRecord = data.Items[0] | ||
const res = await client.delete({ | ||
TableName, | ||
Key: { pk, sk }, | ||
Key: { | ||
[pk]: sessionRecord[pk], | ||
[sk]: sessionRecord[sk], | ||
}, | ||
ReturnValues: "ALL_OLD", | ||
@@ -450,0 +456,0 @@ }) |
Sorry, the diff of this file is not supported yet
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
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
29
49505
8
1242
2
+ Added@auth/core@0.19.1(transitive)
- Removed@auth/core@0.19.0(transitive)
Updated@auth/core@0.19.1