Hi. I try to use this package for authenticate in microservice. JWT token generated by Symfony app with passphrase. await auth.use('jwt').authenticate() except passphrase's error.
[1660925432779] ERROR (server/12898 on Ba-Anh-MacBook-Pro.local): Passphrase required for encrypted key
err: {
"type": "TypeError",
"message": "Passphrase required for encrypted key",
"stack":
TypeError: Passphrase required for encrypted key
at createPrivateKey (internal/crypto/keys.js:351:10)
at JWTGuard.generateKey (/Users/doanbaanh/PhpStormProjects/gold/server/node_modules/adonis5-jwt/build/lib/Guards/JwtGuard.js:341:46)
at JWTGuard.verifyToken (/Users/doanbaanh/PhpStormProjects/gold/server/node_modules/adonis5-jwt/build/lib/Guards/JwtGuard.js:392:29)
at JWTGuard.authenticate (/Users/doanbaanh/PhpStormProjects/gold/server/node_modules/adonis5-jwt/build/lib/Guards/JwtGuard.js:118:36)
at AppController.playerHistory (/Users/doanbaanh/PhpStormProjects/gold/server/app/Controllers/Http/AppController.ts:8:27)
at Injector.callAsync (/Users/doanbaanh/PhpStormProjects/gold/server/node_modules/@adonisjs/fold/build/src/Ioc/Injector.js:124:30)
at processTicksAndRejections (internal/process/task_queues.js:95:5)
"code": "ERR_MISSING_PASSPHRASE",
"status": 500
}
Hi. I try to use this package for authenticate in microservice. JWT token generated by Symfony app with passphrase.
await auth.use('jwt').authenticate()
except passphrase's error.How can I fix this? Thanks.