Open RobinsonZ opened 3 years ago
Indeed it looks like a potential async hooks context loss in express-jwt/passport-jwt/node-jsonwebtoken. Thanks for reporting this. If there will be more cls-rtracer users who suffer from this issue, I'll try to investigate the problem.
When passport.js is used with
session:false
the async context is lost andrTracer.id()
stops returning an ID. I'm pretty sure this a similar issue as described in the README and #20. That said, it seems to be something slightly different, given that #20 is an issue withexpress-session
and I've explicitly disabled sessions here.Specifically I'm using passport.js configured to accept JWTs with
passport-jwt
, using code that looks something like this:I assume this is fundamentally an issue with either passport or passport-jwt, and so it's not fixable on your end. Your readme said to submit an issue, though, so I hope this is helpful.