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

@next-auth/dgraph-adapter

Package Overview
Dependencies
Maintainers
4
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@next-auth/dgraph-adapter - npm Package Compare versions

Comparing version 0.2.2-pr.317-adf65e69.308 to 0.2.2-pr.317-bfdb755d.317

1

dist/client.d.ts

@@ -6,2 +6,3 @@ export interface DgraphClientParams {

jwtSecret?: string;
jwtAlgorithm?: "HS256" | "RS256";
authHeader?: string;

@@ -8,0 +9,0 @@ }

4

dist/client.js

@@ -43,3 +43,3 @@ "use strict";

}
const { endpoint, authToken, jwtSecret, authHeader } = params;
const { endpoint, authToken, jwtSecret, jwtAlgorithm = "HS256", authHeader = "Authorization", } = params;
const headers = {

@@ -51,3 +51,3 @@ "Content-Type": "application/json",

headers[authHeader] = jwt.sign({ nextAuth: true }, jwtSecret, {
algorithm: "HS256",
algorithm: jwtAlgorithm,
});

@@ -54,0 +54,0 @@ }

import { format } from "./utils";
import type { Adapter } from "next-auth/adapters";
import type { DgraphClientParams } from "./client";
export type { DgraphClientParams, DgraphClientError } from "./client";
export interface DgraphAdapterOptions {

@@ -12,4 +13,3 @@ fragments?: {

}
export type { DgraphClientParams };
export { format };
export declare function DgraphAdapter(client: DgraphClientParams, options?: DgraphAdapterOptions): Adapter;

@@ -195,3 +195,2 @@ "use strict";

const { userId, ...input } = data;
console.log(input);
await c.run(

@@ -198,0 +197,0 @@ /* GraphQL */ `

{
"name": "@next-auth/dgraph-adapter",
"version": "0.2.2-pr.317-adf65e69.308+adf65e6",
"version": "0.2.2-pr.317-bfdb755d.317+bfdb755",
"description": "Dgraph adapter for next-auth.",

@@ -47,3 +47,3 @@ "homepage": "https://next-auth.js.org",

},
"gitHead": "adf65e69ea5c7cf950f494fd95e35f34b20357f3"
"gitHead": "bfdb755d195fa5833fc2abfffad4a1605a61e661"
}

@@ -36,14 +36,4 @@ <p align="center">

import NextAuth from "next-auth"
import { DgraphClient, DgraphAdapter } from "@next-auth/dgraph-adapter/dgraphAdapter";
import { DgraphAdapter } from "@next-auth/dgraph-adapter";
const dgraph = new DgraphClient({
endpoint: process.env.DGRAPH_GRAPHQL_ENDPOINT,
apiKey: process.env.DGRAPH_GRAPHQL_KEY,
// you can omit the following properties if you are running an unsecure schema
authHeader: "<YOUR AUTH HEADER>",
jwtSecret: process.env.SECRET
});
// For more information on each option (and a full list of options) go to

@@ -56,3 +46,10 @@ // https://next-auth.js.org/configuration/options

],
adapter: DgraphAdapter(dgraph)
adapter: DgraphAdapter({
endpoint: process.env.DGRAPH_GRAPHQL_ENDPOINT,
authToken: process.env.DGRAPH_GRAPHQL_KEY,
// you can omit the following properties if you are running an unsecure schema
authHeader: "<YOUR AUTH HEADER>",
jwtSecret: process.env.SECRET
})
...

@@ -59,0 +56,0 @@ })

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