Our great sponsors
-
passport-github-auth
A simple express app that authenticate users with github account using passportjs
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
You can get the source code for this project here, this project can be used as a boilerplate code when setting up an express app that uses Passportjs for authentication.
Passport is authentication middleware for Node.js. It is very flexible and modular. A comprehensive set of strategies supports authentication using a username and password, Google, Facebook, Apple, Twitter, and more. Find out more about Passport here.
Before using passport-github2, you must have a Github account and register an application with Github. If you have not done this, You can do that here. Your Homepage URI and Callback URI should match the one in your application. Your application will be issued a Client ID and Client secret, which this strategy needs to work.