Questions tagged [passport.socketio]
25 questions
4
votes
1 answer
passport.socketio keeps saying - failed connection to socket.io: No session found
Im trying to access session object like req.user in socket.io so that I could do something with it, Im using passport.socket.io library to do this. However the problem right now is that i keep getting failed connection to socket.io: No session…

airsoftFreak
- 1,450
- 5
- 34
- 64
4
votes
1 answer
What's the better way of implementing security with MEAN.js
I'm working with mean.js, and I have a little doubt about authentication and authorization here...
MEAN.js come with a out of the box passport.js implementation that seems to be working good enough for me just to know when a user is logged in. But…

rahpuser
- 1,224
- 10
- 31
2
votes
2 answers
How would I verify an users identity SOCKET.IO
I am making an live - chat platform, but I cannot find a way to verify a users identity.
I do not have any code because there arent any errors.

Liam Sholts
- 85
- 7
2
votes
5 answers
Passport.socketio has issues finding session
I am trying to access the session from sockets, but can't seem to make a connection. Without fail, authorization fails and I get the fail callback with the following message:
failed connection to socket.io: No session found
I will place all my code…

Wesley Porter
- 1,401
- 2
- 13
- 15
2
votes
1 answer
Node.JS + Passport.SocketIO: Edit And Save `socket.handshake.user` Properties
I am using Node.JS (0.10.28), Passport.JS (0.2.0) + Passport-Google (0.3.0), and Passport.SocketIO (3.0.1).
Currently, I am able to access the user created by Passport.JS in my app's paths by using req.user:
app.get('/profile', function(req, res)…

rgajrawala
- 2,148
- 1
- 22
- 35
2
votes
2 answers
passport.socketio's passport "Failed to deserialize user out of session". But passport in my main app (with the same key) deserializes just fine
passport.socketio throwing this error, while failing to authorize the user.
Error: Error: Failed to deserialize user out of session
I've narrowed the problem down to passport.socketio's /lib/index.js.
At line 59
…

laggingreflex
- 32,948
- 35
- 141
- 196
2
votes
1 answer
Socket.io, Passport, MongoDB & passport.socketio broken in production
I built a nodejs application relaying on socket.io, using Passport & passport.socketio for authentication and authorization, and mongodb with connect-mongo for session store.
It works well on my laptop, but when I moved to the Cloud (Azure-VM) I…

Guy Korland
- 9,139
- 14
- 59
- 106
1
vote
2 answers
How to access user object using passportSocketIo
I'm user passport.js for authentication for both express and socket.io servers. I've got this working through the use of passportSocketIo. When an authenticated user hits the server they are successfully deserialized and the success callback is…

RiddleRiddlerRddler
- 303
- 3
- 17
1
vote
1 answer
passportSocketIo.authorize does not call success or fail callbacks
I've recently implemented passport.js for authentication onto my express server. I'm trying to leverage this authentication for my socket.io server as well. So I'm trying to use the passport.socketio package to do this.
I'm using it as…

RiddleRiddlerRddler
- 303
- 3
- 17
1
vote
0 answers
passport.socketIO initializes before passport causing error
Here's my code for initializing passport before passport.socketIO. Occasionally, passportSocketIo throws an error saying that Passport was not initialized. Is there anyway I can use async await on app.use to ensure that passport gets initialized…

YUSHUF
- 11
- 1
- 2
1
vote
0 answers
how does a user connected to a room using socket.io get the data that was send to the room before he joined it
a user joins a room and emits its username to the room using passport.socketio . With the help of socket.request.user.user_id i am able to get the user_id of the socket and fetch the username corresponding to user_id from the database.
function…

roh_dev
- 275
- 2
- 6
- 17
1
vote
1 answer
passport.socketio & client side connect/reconnect only when reboot server
I've got a real time app that works fine with express+passportJS and without socket authentication.
When I add passport.socketio, my problem is that sockets will only connect when I reboot the server...
I've got passportjs & passport.socketio on the…

user1144446
- 561
- 1
- 4
- 17
1
vote
2 answers
client connecting twice to server, Socket.io
I am trying to log username of logged in users by connecting socket.io to passport.js using passport.socketio. It is successful however it logs the username twice and after trying and searching for a fair amount of time I am stuck.
The code sections…

zecuria
- 728
- 4
- 9
1
vote
0 answers
How to access passport user on client side?
I have used passport local strategy to authenticate the user and used connect-mongo as sessionstore module to save passport/express sessions in mongodb and I integrated
passport.socketio and authorized the user using
…

LoneRanger
- 665
- 13
- 31
1
vote
0 answers
Does Express.io has a property authorization to reload a session data??
I have been implementing the socket concept as in the https://github.com/techpines/express.io/tree/master/examples/sessions, I am able to display the session data that is stored once the page is initialised.
But nevertheless , when a session data…

user2749751
- 405
- 7
- 22