hapi-knoc
v0.0.5-facebook-alpha-v4
Published
A Hapi.js plugin for Authentication like Bell, but with freedom of validation logic handling left as pluggable parameters
Downloads
4
Readme
CAUTION: Work in progress. Not stable.
Hapi Knoc
A bell like plugin for authentication with Hapi.js, with the freedom of custom handler logic. Supports -[x] Facebook
Installation
npm install hapi-knoc --save
yarn add hapi-knoc
Usage
// facebook oauth
import {fb, FacebookConfig} from 'hapi-knoc';
import * as config '/path/to/my/config';
const fbHandler = async (req, h) => {
const token = request.payload.token;
// Pass in the config
const fbConfig:FacebookConfig = config.facebook;
return data = await fb.validate(token, fbConfig);
}