Skip to content

Commit fdf2d5c

Browse files
authored
Await async jwt.verify function
1 parent 92b7a26 commit fdf2d5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export const expressjwt = (options: Params) => {
171171
const key = await getVerificationKey(req, decodedToken);
172172

173173
try {
174-
jwt.verify(token, key, options);
174+
await jwt.verify(token, key, options);
175175
} catch (err) {
176176
const wrappedErr = new UnauthorizedError('invalid_token', err);
177177
if (err instanceof jwt.TokenExpiredError && typeof options.onExpired === 'function') {

0 commit comments

Comments
 (0)