Skip to content

Commit

Permalink
Satisfy ESM
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan authored and EmrysMyrddin committed Jul 10, 2023
1 parent f7c90ff commit a0b20f1
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 a0b20f1

Please sign in to comment.