Should I consolidate session management with Sails.js and Stormpath?

I am studying the use of Stormpath for our user management.

I currently have a Sails.js application that uses Node.js / Express.js. Session management is currently performed by default on the Sails.js framework, which relies heavily on Express middleware.

Sessions are stored in a common Redis database during production, so we can keep our multiple API servers idle.

My question is, will conflicting session management systems and / or cause errors? Do we need to consolidate them or can we safely keep them separate? if you need to combine them, how to configure middleware?

As a side note, we will not store much user data in the Stormpath, we will only use it as an auth / token provider.

Thanks for the help!

+6
source share
1 answer

I am the author of the express-stormpath library, and that is what I assume you are evaluating.

You can really use your own sessions in addition to those that are assault. How it works looks like this:

Stormpath uses req.session to store the stormpathSession cookie. Any other cookies you create / store will be completely processed by you.

It should work well with any session library you select =)

+5
source

Source: https://habr.com/ru/post/984688/


All Articles