How to get session object under beforeConnect method inside sails.config.sockets ?
75 views
Skip to first unread message
Sumit Yadav
unread,
Aug 22, 2017, 5:43:36 AM8/22/17
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to sails.js
It was onConnect in v0.10 there inside sails.config.sockets earlier instead beforeConnect now in v0.11 which is being used to allow or deny every socket connection requestting sails app to connect. Am looking around for session object under beforeConnect method whose prototype is
beforeConnect:function(handshake, cb){
}
Is there any way to get session object under this method to make authentication easy using session keys ?
Here is current prototype for afterDisconnect method which allows me to get session object.