I'm pretty new to the node world. I have looked around for this for few days, and I can't find the way to do it with existing npm "official" solutions. If there apologies, I'll hopefully get better in finding the right node resources.
I have implemented a working passport local policy following the various examples available on the internet. It works well
it looks like that no, there is no way to do that, and the situation is still the one that can be inferred from this answer: passport.js local strategy- logging in with username, authenticate later requests with token` by the passport.js creator himself.
I ended up creating my own. For the record the approach I used is to have two passport strategies:
POSTparameters, and using the user id stored in the token to query the users database. The jwt solution uses node-jwt-simple https://github.com/hokaccha/node-jwt-simple.
It all works, but I have lost the ability to easily fallback to a cookie based session. Hopefully someone more skilled than me might be able to create a solution to do so, taking advantage of the standard express session nmp