-
Notifications
You must be signed in to change notification settings - Fork 87
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
Sockets can`t recreate the session #58
Comments
Hmm, this is more a Sails problem. balderdashy/sails#2274 |
Authentication already relies on JWT tokens in the boilerplate, so I ended up completely disabling sails (express) session, because it caused multiple problems (one example is when user logged out and then tried to register, sails still got session of previously logged out user even if session was destroyed beforehand - logout call to sails api). Also it is recommended to use session less to free up server memory (if external session storage is not configured). |
@siready Hmm, seems like I cannot disable those sessions like you proposed. Basically if I add config/express.js sails will complain about deprecated configuration file => so no solution. And if I add that
So do you have a working solution for this without warnings and errors? |
Also I'm thinking that some of this is in sails core, like that sails PR shows. I just hope that balderdashy guys get that socket.io 1.0 soon to core, so they can merge that PR. |
I'll have to check all the changes I made. But I remember it was working straight away without a hassle (added to config/http.js). Also commented out session from 'order' object in the begging of that file. Will try to contribute back as soon as I have some more time. Ah yeah, and I'm not using blueprint actions, so that might be it (balderdashy/sails#841 (comment)). The only warning I get in production mode is: From what I checked session wasn't stored for me, meaning that there isn't any memory problem. |
Aah, I'm using blueprints all the way, so maybe that is the problem. So we just have to wait for that PR to fix this properly. |
This should be fixed with current version of boilerplate, thanks to sails 0.11.0. |
Sometimes on my development process,
sails
session run out and the app gets broken. Sockets.io do not recreate sessions, so every socket connection get unauthenticated in sails side. This behavior is not seen by the app which do nothing.The problem is better documented on this comments
I bring the problem to angular boilerplate because the app architecture collaborate for the issue, as sails server is reached only be sockets.
I
ll try to match the failed connect within interceptors, but not sure yet how to detect it. Maybe a fix for
AuthInterceptor`.The text was updated successfully, but these errors were encountered: