In this chapter you’ve seen an end-to-end example of implementing users in a website. You set up and configured Express as the webserver. Then you connected to MongoDB and used it as the source for the User
schema defined in Mongoose and as the persistent store for the authentication sessions. You configured the routes to allow users to sign up, log in, update their profiles, and delete their accounts. The AngularJS implementation shows how to use the $http
service to get user data from the server.
In this chapter, you’ve also seen how to utilize the Passport module to implement OAuth
and OpenID
authentication sources such as Google in your application. Passport makes it very simple to add one or more authentication sources to your applications.