00:14:45  * TheThingquit (Remote host closed the connection)
00:16:52  * TheThingjoined
00:21:42  * TheThingquit (Remote host closed the connection)
00:28:15  * jongleberryquit
00:48:47  * mezodjoined
00:53:07  * mezodquit (Ping timeout: 245 seconds)
01:09:07  * macwinne_quit (Remote host closed the connection)
01:11:04  * macwinne_joined
01:12:28  * danneuquit (*.net *.split)
01:12:33  * AustinMathernequit (*.net *.split)
01:12:41  * AustinMathernejoined
01:18:28  * danneujoined
01:23:30  * juliangruberquit (*.net *.split)
01:23:31  * trollixxquit (*.net *.split)
01:23:31  * lennonquit (*.net *.split)
01:23:32  * McJesusquit (*.net *.split)
01:23:39  * trollixxjoined
01:24:02  * McJesusjoined
01:32:22  * juliangruberjoined
02:42:53  * jnap_quit (Read error: Network is unreachable)
02:43:57  * kudosquit (Ping timeout: 258 seconds)
02:44:54  * jnap_joined
04:40:25  * kudosjoined
06:17:02  * macwinne_quit (Remote host closed the connection)
07:55:47  * SuperHansjoined
10:43:39  * Cohedrin_quit (Quit: My Mac has gone to sleep. ZZZzzz…)
11:17:16  * SuperHansquit (Remote host closed the connection)
11:55:20  * TheThingjoined
11:58:17  * SuperHansjoined
12:01:43  * ArchNoobjoined
12:01:51  <ArchNoob>Yo.. Sup!
12:02:39  <ArchNoob>Just kidding, Hi everyone please help i have a question.
12:02:44  <ArchNoob>http://stackoverflow.com/questions/41547195/koa-v2-getting-user-object-after-passport-loca-login
12:04:00  * TheThingquit (Remote host closed the connection)
12:05:07  * TheThingjoined
12:27:27  * mezodjoined
13:07:14  <danneu>ArchNoob: think it'd be something like `new LocalStrategy(async (uname, pwd, done) => { ... user = await User.findOne() ... done(null ,user) })`. check to see if your
13:07:35  <danneu>check to see if your User.findOne lib returns a promise so that you can await it
13:07:45  <danneu>some libs will return a promise if you dont pass in a callback
13:07:59  <danneu>also, remove the User.find stuff and just focus on getting your LocalStrategy working
13:08:20  <danneu>for instance, `const user = { id: 42, uname: "foo" }`, just stub it out
13:12:21  <danneu>async/await is peculiar enough, imo best way to figure it out when youre in trouble is to reduce the code to a bare minimum and see if you can get it working
13:28:46  * lennonjoined
13:46:13  <ArchNoob>danneu: Thank you for your advice.
13:46:17  <ArchNoob>I'm working on it!
13:46:25  <ArchNoob>was doing something away from irc
13:51:10  * ArchNoobquit (Ping timeout: 260 seconds)
15:10:11  * ArchNoobjoined
15:11:20  <ArchNoob>danneu: Hi, i went for a meal.
15:11:53  <ArchNoob>Reading your advice i should say that the LocallStrategy works! It pass and everything works fine.
15:12:32  <ArchNoob>the only thing is i can't get the passed down user.. `done(null, user);` in the next middleware.
15:13:25  <ArchNoob>i've done with your advice and it's mongoose it works too. It returned a promise and await got it.
15:20:26  * mezodquit (Remote host closed the connection)
15:21:49  <ArchNoob>danneu: i just solved it with something i'm not sure it's a hack or legit. I used passReqToCallback: true, then i set // in passport `req.body = user;`
15:29:36  * lennonquit (*.net *.split)
15:34:42  * lennonjoined
16:02:30  * anzileirojoined
16:02:45  <anzileiro>Hy guys!
16:02:52  <anzileiro>Hi*
16:03:37  * anzileiroquit (Client Quit)
16:05:16  * SuperHansquit (Remote host closed the connection)
16:08:17  * ArchNoobquit (Read error: Connection reset by peer)
16:24:34  * ArchNoobjoined
16:30:21  * mezodjoined
16:35:41  <danneu>ArchNoob: authentication middleware in koa usually has something like `ctx.request.user = await db.findUserBySessionId(ctx.cookies['session_id']); next();`. i just have no clue how passport works though
16:35:55  <danneu>i mean `ctx.user = await ...`
16:42:08  * ArchNoobquit (Ping timeout: 256 seconds)
19:04:37  * ArchNoobjoined
19:26:35  * ArchNoobquit (Ping timeout: 260 seconds)
19:39:37  * ArchNoobjoined
19:55:18  * ArchNoobquit (Read error: Connection reset by peer)
20:13:53  * ArchNoobjoined
20:19:36  * JD-Robbsjoined
20:28:07  * ArchNoobquit (Ping timeout: 240 seconds)
20:33:43  * Cohedrin_joined
21:06:15  * SuperHansjoined
21:10:32  * SuperHansquit (Ping timeout: 255 seconds)
21:58:05  * Cohedrin_quit (Quit: My Mac has gone to sleep. ZZZzzz…)
21:58:31  * Cohedrin_joined
22:51:30  * Cohedrin_quit (Quit: My Mac has gone to sleep. ZZZzzz…)
22:52:12  * Cohedrin_joined
22:52:51  * Cohedrin_quit (Client Quit)
22:53:09  * Cohedrin_joined