Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better solution #49

Closed
zevero opened this issue Jun 2, 2015 · 2 comments
Closed

Better solution #49

zevero opened this issue Jun 2, 2015 · 2 comments

Comments

@zevero
Copy link

zevero commented Jun 2, 2015

Respect to wcamarao for developing this tool, which closes an important gap.
Unfortunately it didn't work for me as I could not get around this:

node_modules/session.socket.io/session.socket.io.js:23
sessionLookupMethod.call(sessionStore, findCookie(socket.handshake), fun
                      ^
TypeError: Cannot call method 'call' of undefined

I lost an hour or two googling for similar problems ... until I found:
http://stackoverflow.com/a/29448630/1385546
which links to
https://github.com/xpepermint/socket.io-express-session

Please forgive my boldness, but I can't help that this approach using the new io middleware is far easier and cleaner. (Despite my not fully understanding :)

@wcamarao
Copy link
Owner

wcamarao commented Jun 3, 2015

That's fantastic, I'll update the README.

The key point is here: http://socket.io/docs/migrating-from-0-9/

Migration from 0.9
Socket.io uses middleware now

In other words, if you're using socket.io >= 1.0,
go with https://github.com/xpepermint/socket.io-express-session

Otherwise, https://github.com/wcamarao/session.socket.io

@zevero
Copy link
Author

zevero commented Jun 5, 2015

Thank you. I am glad that you are so positive about this.

I am sure that many people like me can save time and will have a nicer experience working with express sessions and socket.io!

@zevero zevero closed this as completed Jun 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants