DEV Community

Discussion on: Authentication in NodeJS With Express and Mongo - CodeLab #1

Collapse
 
shivain07 profile image
Shivain

json web token invalid how can i resolve this error /

JsonWebTokenError: invalid signature
   at C:\Users\shiva\Documents\mongotut\node_modules\jsonwebtoken\verify.js:133:19
   at getSecret (C:\Users\shiva\Documents\mongotut\node_modules\jsonwebtoken\verify.js:90:14)
   at Object.module.exports as verify
   at module.exports (C:\Users\shiva\Documents\mongotut\controllers\auth.js:10:21)
   at Layer.handle as handle_request
   at next (C:\Users\shiva\Documents\mongotut\node_modules\express\lib\router\route.js:137:13)
   at Route.dispatch (C:\Users\shiva\Documents\mongotut\node_modules\express\lib\router\route.js:112:3)
   at Layer.handle as handle_request
   at C:\Users\shiva\Documents\mongotut\node_modules\express\lib\router\index.js:281:22
   at Function.process_params (C:\Users\shiva\Documents\mongotut\node_modules\express\lib\router\index.js:335:12)
   at next (C:\Users\shiva\Documents\mongotut\node_modules\express\lib\router\index.js:275:10)
   at Function.handle (C:\Users\shiva\Documents\mongotut\node_modules\express\lib\router\index.js:174:3)
   at router (C:\Users\shiva\Documents\mongotut\node_modules\express\lib\router\index.js:47:12)
   at Layer.handle as handle_request
   at trim_prefix (C:\Users\shiva\Documents\mongotut\node_modules\express\lib\router\index.js:317:13)
   at C:\Users\shiva\Documents\mongotut\node_modules\express\lib\router\index.js:284:7