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

Removes the socket hook's dependency upon the session hook. #2274

Conversation

lwansbrough
Copy link
Contributor

So this removes the session hook requirements from the sockets hook. Helpful for those of us using JWTs.

@mikermcneil
Copy link
Member

Cool, thanks!

@lwansbrough
Copy link
Contributor Author

No problem. Let me know if you've got any concerns.

@weyert
Copy link

weyert commented Oct 6, 2014

Can this be merged?

@@ -19,6 +19,8 @@ module.exports = function(sails) {

return function socketAttemptingToConnect (handshake, accept) {

if(!sails.config.hooks.session) return accept(null, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • space after if.
  • (My preference) add curly braces, always.

@tarlepp
Copy link
Contributor

tarlepp commented Nov 7, 2014

What is the hold up with this?

@mikermcneil
Copy link
Member

@tarlepp working on it- affects the sio1.0 stuff

@lwansbrough
Copy link
Contributor Author

👍

@loicsaintroch
Copy link
Contributor

Any update on this pull request guys?

@mikermcneil
Copy link
Member

@loicsaintroch @lwansbrough I think this is sorted in https://github.com/balderdashy/sails-hook-sockets/blob/master/lib/initialize.js#L50 - would you mind installing 0.11.0-rc5 and giving it a go?

@lwansbrough
Copy link
Contributor Author

Thanks Mike, I'll take a look a little later.

@mikermcneil
Copy link
Member

@lwansbrough alright I believe we're good now. Added tests here: https://github.com/balderdashy/sails-hook-sockets/blob/master/test/without-session.test.js Going to go ahead and close- thanks for your help :)

@lwansbrough
Copy link
Contributor Author

@mikermcneil Oops forgot to report back! Works great thank you.

@fabdrol
Copy link

fabdrol commented Feb 19, 2015

@mikermcneil Does this require 0.11?

@tarlepp
Copy link
Contributor

tarlepp commented Feb 19, 2015

@fabdrol yep it requires 0.11.x sails, I just tested this with sails 0.11.0 and session hook disabled and it works like a charm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

7 participants