From 251d916e7683721573d05a925ef1f5ef0f3063d4 Mon Sep 17 00:00:00 2001 From: Shaun Hamilton <51722130+ShaunSHamilton@users.noreply.github.com> Date: Fri, 19 Mar 2021 05:43:56 +0000 Subject: [PATCH] fix(learn): specify connect-mongo version in adnode (#41524) --- .../advanced-node-and-express/authentication-with-socket.io.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/curriculum/challenges/english/06-quality-assurance/advanced-node-and-express/authentication-with-socket.io.md b/curriculum/challenges/english/06-quality-assurance/advanced-node-and-express/authentication-with-socket.io.md index 1d6969e711..61f22a9988 100644 --- a/curriculum/challenges/english/06-quality-assurance/advanced-node-and-express/authentication-with-socket.io.md +++ b/curriculum/challenges/english/06-quality-assurance/advanced-node-and-express/authentication-with-socket.io.md @@ -10,7 +10,7 @@ dashedName: authentication-with-socket-io Currently, you cannot determine who is connected to your web socket. While `req.user` contains the user object, that's only when your user interacts with the web server, and with web sockets you have no `req` (request) and therefore no user data. One way to solve the problem of knowing who is connected to your web socket is by parsing and decoding the cookie that contains the passport session then deserializing it to obtain the user object. Luckily, there is a package on NPM just for this that turns a once complex task into something simple! -Add `passport.socketio`, `connect-mongo`, and `cookie-parser` as dependencies and require them as `passportSocketIo`, `MongoStore`, and `cookieParser` respectively. Also, we need to initialize a new memory store, from `express-session` which we previously required. It should look like this: +Add `passport.socketio`, `connect-mongo@~3.2.0`, and `cookie-parser` as dependencies and require them as `passportSocketIo`, `MongoStore`, and `cookieParser` respectively. Also, we need to initialize a new memory store, from `express-session` which we previously required. It should look like this: ```js const MongoStore = require('connect-mongo')(session);