@next-auth/dgraph-adapter
Advanced tools
Comparing version 0.2.2-pr.317-aaa64f4f.310 to 0.2.2-pr.317-abc25aee.321
export interface DgraphClientParams { | ||
endpoint: string; | ||
/** `X-Auth-Token` header value */ | ||
/** | ||
* `X-Auth-Token` header value | ||
* | ||
* [Dgraph Cloud Authentication](https://dgraph.io/docs/cloud/cloud-api/overview/#dgraph-cloud-authentication) | ||
*/ | ||
authToken: string; | ||
/** [Using JWT and authorization claims](https://dgraph.io/docs/graphql/authorization/authorization-overview#using-jwts-and-authorization-claims) */ | ||
jwtSecret?: string; | ||
/** | ||
* @default "RS256" | ||
* | ||
* [Using JWT and authorization claims](https://dgraph.io/docs/graphql/authorization/authorization-overview#using-jwts-and-authorization-claims) | ||
*/ | ||
jwtAlgorithm?: "HS256" | "RS256"; | ||
/** | ||
* @default "Authorization" | ||
* | ||
* [Using JWT and authorization claims](https://dgraph.io/docs/graphql/authorization/authorization-overview#using-jwts-and-authorization-claims) | ||
*/ | ||
authHeader?: string; | ||
@@ -7,0 +23,0 @@ } |
@@ -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; |
{ | ||
"name": "@next-auth/dgraph-adapter", | ||
"version": "0.2.2-pr.317-aaa64f4f.310+aaa64f4", | ||
"version": "0.2.2-pr.317-abc25aee.321+abc25ae", | ||
"description": "Dgraph adapter for next-auth.", | ||
@@ -47,3 +47,3 @@ "homepage": "https://next-auth.js.org", | ||
}, | ||
"gitHead": "aaa64f4f97e7983e22a55073538f6f1a47fe46c5" | ||
"gitHead": "abc25aee47b510044faa1ac27150258aef7eeecc" | ||
} |
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
23425
460