crash on verifyJWT decoded.payload #1
Owner
```
E:\projects\sandbox\linkylinky\src\server.js:51
fastify.log.info(`Token verified. User is ${decoded.payload?.user}`);
^
TypeError: Cannot read property 'payload' of undefined
at E:\projects\sandbox\linkylinky\src\server.js:51:61
at Object.module.exports [as verify] (E:\projects\sandbox\linkylinky\node_modules\jsonwebtoken\verify.js:63:12)
at Object.verify (E:\projects\sandbox\linkylinky\node_modules\fastify-jwt\jwt.js:149:11)
at Object.async [as verifyJWT] (E:\projects\sandbox\linkylinky\src\server.js:46:17)
at Auth.nextAuth (E:\projects\sandbox\linkylinky\node_modules\fastify-auth\auth.js:76:28)
at onAuth (E:\projects\sandbox\linkylinky\node_modules\fastify-auth\auth.js:86:23)
at done (E:\projects\sandbox\linkylinky\node_modules\fastify-basic-auth\index.js:45:9)
at Object.basicAuth (E:\projects\sandbox\linkylinky\node_modules\fastify-basic-auth\index.js:20:7)
at Auth.nextAuth (E:\projects\sandbox\linkylinky\node_modules\fastify-auth\auth.js:76:28)
at Object._auth (E:\projects\sandbox\linkylinky\node_modules\fastify-auth\auth.js:50:9)
[nodemon] app crashed - waiting for file changes before starting...
```
bug
label
Fixed auth error crashing the entire server thanks to fastify handling stuff not the same way that they do in the docs.....
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?