passport-app

0.0.1 • Public • Published

Passport-App

Passport strategy for FA app authentication.

Installation

$ npm install passport-app

Usage

Configure Strategy

The dummy authentication strategy authenticates or denies all requests based on the 'allow' option passed to it.

passport.use(new AppStrategy(
  function(done) {
    return done(null, {username: 'dummy'});
  }
));

Authenticate Requests

Use passport.authenticate(), specifying the 'dummy' strategy, to authenticate requests.

For example, as route middleware in an Express application:

app.post('/login', 
  passport.authenticate('app', { failureRedirect: '/login' }),
  function(req, res) {
    res.redirect('/');
  });

License

(The MIT License)

Readme

Keywords

none

Package Sidebar

Install

npm i passport-app

Weekly Downloads

0

Version

0.0.1

License

none

Last publish

Collaborators

  • konteck