Basic authentication is one of the simplest authentication strategies because it doesn't require cookies, sessions, or even a login form! Instead, it uses HTTP headers which means credentials are transmitted on each request.
You will need to install passport
and passport-http
. The passport-http
module is what allows you set up the Basic Authentication Scheme, in addition to a couple other authentication strategies.
$ npm install express passport passport-http --save