everyauth icon indicating copy to clipboard operation
everyauth copied to clipboard

findUserById vs session data

Open jgallen23 opened this issue 13 years ago • 3 comments

I was curious what was being stored in redis for sessions and I noticed my entire user schema is being stored. I also noticed that findUserById is being called on every request. It seems like findUserById should only be called if there isn't a user already stored in session data, right? Am I missing something?

jgallen23 avatar May 03 '12 15:05 jgallen23

Me too. I'd like to find a way to avoid findUserById being called so frequently.

iatek avatar Jun 11 '12 18:06 iatek

I was curious about this as well, then noticed that method "findUserById" can have access to req (req.session) by calling with 3 arguments.

everyauth.everymodule.findUserById( function (req, userId, callback) { var sess = req.session; });

contactm avatar Aug 03 '12 08:08 contactm

Do you what version are you using, or when this was introduced. I don't seem to have the ability to pass req into everyauth.everymodule.findUserById - thanks

iatek avatar Nov 08 '12 14:11 iatek