All Questions
13 questions
1
vote
1
answer
2k
views
replacing sails.js redis session store with cookies or localstorage
Our team is maintaining an app using Sails.js framework, this app serves as an admin panel for a larger app and as such does not see much traffic. To streamline it and minimize moving parts, we wanted ...
1
vote
0
answers
82
views
req.sessionID always different except when called from localhost?
I got several question about sessions/connect/mongodb
Basically I'm just trying to share sessions between 2 aps, A and B, both are node apps (one is using sails).Consider that app B is not mine and I'...
6
votes
1
answer
386
views
Should I consolidate session management using Sails.js and Stormpath?
I'm investigating using Stormpath for our user Management.
I currently have a Sails.js application which uses Node.js / Express.js. Currently, session management is handled by the default Sails.js ...
0
votes
1
answer
71
views
Difference B/W Session and Cookie in Sailjs
I've a large application working on and I am facing with hte problem of sessions a lot, it just unset or corrupt the session of my application sometime, all I got it undefined in my session.
By the ...
0
votes
2
answers
175
views
Why does this flash policy module (express middleware) use _.clone() in Sails.js?
From a tutorial on Sails, this is a Sails policy - essentially Express middleware:
module.exports = function(req, res, next) {
res.locals.flash = {};
if (!req.session.flash) return next();
...
3
votes
1
answer
2k
views
SailsJs :: Keep sessions with mocha
I need to keep my sessions alive between to mocha requests.
After login, I store in the user id in the express session object :
req.session.user = user.id ;
On a browser, the session is kept ...
2
votes
1
answer
1k
views
Sails.js single instance of an authenticated user
I would like to only allow one instance of a user logged in. If I log in on this computer, and then go to another computer to login, the previous session should be destroyed. How can I do that? How ...
4
votes
1
answer
2k
views
Sails.js rolling sessions
A rolling session is a session that expires in a set amount of time should there be no user activity(excluding websockets live updating data). If the user visits another part of the site before expiry,...
0
votes
1
answer
777
views
Is it possible to access a session variable directly in a Model in SailsJS
I have a situation where I'd like to use Sails' create blueprint on a Model. However, I need to access a session variable on that create:
URL:
/api/myModel/create [post]
Model:
module.exports = ...
1
vote
2
answers
980
views
How to get access to req (request) property from service
It is simple to get access to session property from the action of controller.
var SomeController = {
someAction: function(req, res) {
// no we have access to session object
if (!req.session....
0
votes
1
answer
96
views
how it works sessions in passport-local and express
I'm trying to implement sessions in my sailsjs app. To make login I'm using passport and passport-local, by default passport manage session with serialize and deserialize but how it works, in the ...
2
votes
2
answers
2k
views
Getting rid of session and socket pooling sailsjs
Hi I am current working on my rest api app using sails. I was reading the following article
http://engineering.linkedin.com/nodejs/blazing-fast-nodejs-10-performance-tips-linkedin-mobile
In point 2 ...
8
votes
4
answers
6k
views
Sails.js authorization for socket requests
I'm trying to build a chat application based on sails.js. The url for messages from a specific chat looks like this:
/api/chat/:id/messages
When I request this url with XHR, it provides a session ...