Node.js applications are no exception to this. In this tutorial, we will use a relatively new but very popular authentication middleware - Passport. We will create a sample Express app from scratch and progress via adding routes to it and authenticating some of those routes. We are creating a Mongoose model which performs CRUD operations on the underlying database.

10m read timeFrom code.tutsplus.com
Post cover image
Table of contents
Authentication StrategiesSetting Up the ApplicationAdding Project DependenciesCreating Mongoose ModelConfiguring MongoConfiguring PassportSerializing and Deserializing User InstancesUsing Passport StrategiesCreating RoutesCreating Jade ViewsImplementing Logout FunctionalityProtecting RoutesConclusion
1 Comment

Sort: