Passport login and persisting session

前端 未结 5 1061
悲哀的现实
悲哀的现实 2020-12-22 22:11

Background

I have a MEAN application with CRUD capabilities fully tested with postman. I have been trying to persist login for quite some time now with no luck. I

5条回答
  •  孤城傲影
    2020-12-22 22:35

    Passport.js does not work well as it stores the session in the server (bad and not scalable). You don't want to store any session data in the server (keeping it stateless) as then you may scale up your clusters and handle more requests.

    If you look at the code in the Passport.js library, there isn't much.. Building it yourself can actually be faster and more efficient.

    Here is a tutorial I wrote on connecting to Google in a much better way.

提交回复
热议问题