knoc
v0.0.5-canary-6
Published
Authentication Toolkit for Node.js
Downloads
4
Readme
CAUTION: Work in progress. Not stable.
Knoc
A bell like plugin for authentication with Hapi.js, with the freedom of custom handler logic. Supports -[x] Facebook
Installation
npm install knoc --save
yarn add knoc
Usage
// facebook oauth
import {fb, FacebookConfig} from 'knoc';
import 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);
}