Nodejs sockjs token authentication

400 views
Skip to first unread message

Alec Embke

unread,
May 12, 2014, 4:59:57 PM5/12/14
to soc...@googlegroups.com
Hey everybody,

Our team has been using sockjs for a while now and we kept running into the same application requirements around sockjs so we decided to abstract it and release it as a library. It seems that a lot of people request help around token based authentication (in lieu of cookies) and some extra application level requirements such as events, publish/subscribe, etc. 

Here's a couple repos that hopefully help abstract away most of these issues. Currently it supports token based authentication, an rpc abstraction layer, and publish-subscribe functionality. Both the client and server are still in "beta" as we haven't yet had a chance to incorporate them in their current form into our production code base. Feel free to poke around and if you notice any issues with either the code or documentation please don't hesitate to submit an issue ticket or even a pull request. The documentation could definitely use some lipstick and it should be updated sometime in the next week, but in the meantime if you notice anything odd please shoot me a message on here or github. The library requires redis, express, and sockjs. We considered adding custom events, but after some thought we realized that in a horizontally scaling environment (with a shared redis host) custom events would need to implemented on top of publish-subscribe logic anyways so we might as well just stick to that. If you have any thoughts on that in particular we'd be very open to hearing them. 


We'll probably release this on stackoverflow, etc sometime in the next couple of weeks after we've had a chance to port some production code to this model but in the meantime we'd like to hear any of your thoughts as well. We'll also probably release a server client module as well, but at the moment it's not an immediate need of ours so it'll probably have to wait a bit. 

Cheers,
Alec

dre...@gmail.com

unread,
Mar 1, 2015, 3:52:54 PM3/1/15
to soc...@googlegroups.com
Would also like to know whether you have pushed this to production considering this post is 9 months old :)

dre...@gmail.com

unread,
Mar 1, 2015, 3:52:56 PM3/1/15
to soc...@googlegroups.com
Thanks for sharing here.

I saw this package today and seems to meet my requirements. Will be basing this heavily on a project and will submit PRs and need arises.


On Monday, 12 May 2014 22:59:57 UTC+2, Alec Embke wrote:

Alec Embke

unread,
Mar 2, 2015, 1:21:49 PM3/2/15
to soc...@googlegroups.com, dre...@gmail.com
No problem. The module has matured quite a bit since that last post so hopefully it handles your use cases. Feel free to submit any PR's or feature requests too as we're still actively looking to expand the API.
Reply all
Reply to author
Forward
0 new messages