Tell us what’s happening:
I have passed this test and the following two but, I am not getting the intended output.
When the client completes authorization, the chat page opens up but with the username as “undefined” - When they are logged in and when they write a message.
The same problem arises in console. While, it is correctly displaying connected and currentUsers variables.
I have tried changing “socket.request.user.name” to “socket.request.user.username”, to no avail. No change. Tried changing the key “express.sid” to “connect.sid” as per google results, again to no avail.
Everything else seems to be in order and working, as per console debugging. Just the socket.request.user.name that seems to be an issue, in my opinion.
The error, verbatim:
Failed connection to socket.io: No session found
Your code so far
My Repl.it =>
https://repl.it/join/gzgkmgjw-shaurcasm
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36
.
Challenge: Authentication with Socket.IO
Link to the challenge: