OAuth Kit
This is a set of reasonable defaults for working with OAuth2-Server and Mongoose for APIs.
This provides a model
configuration definition for OAuth2-Server
as well as Mongoose schemas to get projects started.
Installing
To install oauth-kit
, run:
npm install --save oauth-kit
Use
To use Oauth Kit, we can have an app.js
that looks a bit like this:
var express = ;var mongoose = ; mongoose; var User = mongoose;var Client = mongoose;var AccessToken = mongoose;var RefreshToken = mongoose; var app = ;var oauthModel = AccessToken RefreshToken Client User; appoauth = model: oauthModel; app;