Skip to content

Commit

Permalink
Satisfy ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Oct 22, 2022
1 parent 6ec1e06 commit c0ce8e2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/plugins/jwt/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { JwksClient } from 'jwks-rsa'
import { decode, verify, JwtPayload, Algorithm } from 'jsonwebtoken'
import jsonwebtoken, { JwtPayload, Algorithm } from 'jsonwebtoken'
import { Plugin } from 'graphql-yoga'
import { GraphQLError } from 'graphql'

const { decode, verify } = jsonwebtoken

export interface JwtPluginOptions {
/**
* The endpoint to fetch keys from.
Expand Down Expand Up @@ -97,7 +99,6 @@ export function useJwt(options: JwtPluginOptions): Plugin {
}
if (signingKey) {
const verified = await new Promise((resolve, reject) => {

verify(
token,
signingKey!,
Expand Down

0 comments on commit c0ce8e2

Please sign in to comment.