At times you might want to allow users the ability to use other authentication sources to authenticate to your server. The passport
NPM provides functionality that allows you to implement OAuth
and OpenID
authentication methods from social media sites such as Google, Facebook, and Twitter.
Implementing authentication using these sources can be a hassle, but the Passport NPM provides middleware that hooks into Express and obfuscates most of the complexity. The following sections take you through the process of using Passport to implement authentication using social media OAuth
and OpenID
sources.