toa-passport

Passport middleware for Toa

Usage no npm install needed!

<script type="module">
  import toaPassport from 'https://cdn.skypack.dev/toa-passport';
</script>

README

toa-passport

Passport middleware for Toa

![NPM][npm]

Usage

app.use(require('toa-passport').initialize())

// usage of toa-passport is as same as the original passport, except the context of toa will be
// afferented to callback funtion
router.get('/github/login', passport.authenticate('github'))
router.get('/github/callback', passport.authenticate('github', {
  failureRedirect: '/notify'
}, function (err, ctx, user, info) {
}))