Closed mattiapv closed 1 year ago
None of this are needed, why did you add them?
Because without awaiting jwtVerify()
the server crash.
You can try the cookie or the onlyCookie example.
If you make a call to http://localhost:3000/verifyCookie
the server crash.
If I add await request.jwtVerify()
, I receive the correct error (FST_JWT_NO_AUTHORIZATION_IN_HEADER) and the server doesn't crash.
Added missing
async
andawait
keywords,try...catch
block. This prevents server crashes caused by missingawait
onjwtVerify()
function.npm run test
andnpm run benchmark