-
Notifications
You must be signed in to change notification settings - Fork 488
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
Any chance for support for authentication to redis? #10
Comments
As a workaround, you can create the clients yourself: var redis = require('socket.io-redis/node_modules/redis').createClient,
ropts = {/* your redis options */}, subOpts = { detect_buffers:true },
pub = ropts.socket ? redis(ropts.socket) : redis(ropts.port, ropts.host),
sub = ropts.socket ? redis(ropts.socket, subOpts) : redis(ropts.port, ropts.host, subOpts),
if (ropts.pass) {
pub.auth(ropts.pass, function(err) { if (err) { throw err; } });
sub.auth(ropts.pass, function(err) { if (err) { throw err; } });
}
io.adapter(require('socket.io-redis')({
pubClient:pub, subClient:sub
})); |
Yea, thats what I ended up doing. I appreciate it! |
Not sure if this is something that should be added into the redis adapter. If you want anything "special" in your redis clients, you can just inject the instances in the adapter constructor as suggested by @thetalecrafter. Thoughts @guille? |
Closing after discussion in #11. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
No description provided.
The text was updated successfully, but these errors were encountered: