6

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 framework, which relies heavily on Express' session middleware.

Sessions are stored in a shared Redis database on production so that we can keep our multiple API servers stateless.

My question is will the two session management systems conflict and/or cause bugs? Do they have to be consolidated or can we safely keep them separate? if they have to be combined, how do you configure the middleware?

As a note we won't be storing much user data on Stormpath, we'll only be using them as a auth/token provider.

Thanks for the help!

4

1 回答 1

5

我是 express-stormpath 库的作者,我假设您正在评估它。

除了 Stormpath 之外,您确实可以使用自己的会话。它的工作方式是这样的:

Stormpath 用于req.session存储stormpathSessioncookie。您创建/存储的任何其他 cookie 将由您完全处理。

它应该与您选择的任何会话库很好地配合使用 =)

于 2015-04-05T00:54:09.080 回答