crash on verifyJWT decoded.payload #1

Closed
opened 2021-08-20 14:17:03 +00:00 by philipp · 0 comments
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...
``` 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... ```
philipp added the
bug
label 2021-08-20 14:17:17 +00:00
niggl closed this issue 2021-08-21 05:36:01 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: kauft.es/linkylinky#1
No description provided.