diff --git a/src/index.ts b/src/index.ts index e21f91fe..7758f4b8 100644 --- a/src/index.ts +++ b/src/index.ts @@ -171,7 +171,7 @@ export const expressjwt = (options: Params) => { const key = await getVerificationKey(req, decodedToken); try { - jwt.verify(token, key, options); + await jwt.verify(token, key, options); } catch (err) { const wrappedErr = new UnauthorizedError('invalid_token', err); if (err instanceof jwt.TokenExpiredError && typeof options.onExpired === 'function') {