Multiple session secrets - switching between

27 views
Skip to first unread message

Patryk Cieszkowski

unread,
Jun 6, 2016, 11:11:11 PM6/6/16
to sails.js
I'm new to Sails, therefore I'm having silly problems. Excuse my ignorance.

I want to separete my site into two different sections; main content and admin panel. I need additional verification before entering admin CP, so I want to use different sessions for those two sections. How do I do that? The best idea would be to use different secret for admin routes. But how do I change that? How do I modify session secret based on the route I'm in?

Wulf Solter

unread,
Jun 6, 2016, 11:14:42 PM6/6/16
to Patryk Cieszkowski, sails.js
I run multiple policies (http://sailsjs.org/documentation/concepts/policies) for various endpoints. Most endpoints get the 'authenticated' policy, others the 'admin' policy.

On Tue, Jun 7, 2016 at 3:11 PM, Patryk Cieszkowski <ciec...@gmail.com> wrote:
I'm new to Sails, therefore I'm having silly problems. Excuse my ignorance.

I want to separete my site into two different sections; main content and admin panel. I need additional verification before entering admin CP, so I want to use different sessions for those two sections. How do I do that? The best idea would be to use different secret for admin routes. But how do I change that? How do I modify session secret based on the route I'm in?



Patryk Cieszkowski

unread,
Jun 7, 2016, 12:02:48 AM6/7/16
to sails.js, ciec...@gmail.com
That's what I was thinking would be a good idea to start with. Are you dynamically replacing sessions.secret value, or what do you do to separate those sessions?
Reply all
Reply to author
Forward
0 new messages