Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

next-auth-dynamodb

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-auth-dynamodb - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

9

lib/index.js

@@ -58,8 +58,11 @@ "use strict";

const { email, emailVerified, name, image } = profile;
const savedUser = await UserStore.create({
const user = {
email,
emailVerified,
name,
image,
});
};
if (emailVerified !== undefined) {
user.emailVerified = emailVerified;
}
const savedUser = await UserStore.create(user);
log("createUser", { savedUser });

@@ -66,0 +69,0 @@ return savedUser;

{
"name": "next-auth-dynamodb",
"version": "0.1.2",
"version": "0.1.3",
"contributors": [

@@ -5,0 +5,0 @@ "Tom Andrews <git@tomandrews.co.uk>"

@@ -24,2 +24,14 @@ import Omanyd from "omanyd";

it("should not blow up if the user email verify state is unknown", async () => {
const adapter = await nextAuthDynamodb.getAdapter(opts);
const savedUser = await adapter.createUser({
email: "foo@bar.com",
name: "Foo Bar",
image: "foo.png",
});
const readUser = await adapter.getUserByEmail("foo@bar.com");
expect(readUser).toStrictEqual(savedUser);
expect(readUser.emailVerified).toBeUndefined();
});
it("should return the created user by id", async () => {

@@ -26,0 +38,0 @@ const adapter = await nextAuthDynamodb.getAdapter(opts);

@@ -14,3 +14,3 @@ import type { Adapter } from "next-auth/adapters";

image: string;
emailVerified: boolean;
emailVerified?: boolean;
}

@@ -60,3 +60,3 @@

image: string;
emailVerified: boolean;
emailVerified?: boolean;
}

@@ -99,8 +99,11 @@

const { email, emailVerified, name, image } = profile;
const savedUser = await UserStore.create({
const user: Omit<User, "id"> = {
email,
emailVerified,
name,
image,
});
};
if (emailVerified !== undefined) {
user.emailVerified = emailVerified;
}
const savedUser = await UserStore.create(user);
log("createUser", { savedUser });

@@ -107,0 +110,0 @@ return savedUser;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc