Complete, compliant and well tested module for implementing an OAuth2 server in node.js.
Using the express wrapper (recommended):
var express = ;var oauthserver = ;var app = ;var oauth = model: model ;app;appapp;
Using this module directly (for custom servers only):
var Request = Request;var oauthServer = ;var oauth = model: model ;var request =headers: authorization: 'Bearer foobar';oauth;
Note: see the documentation for the specification of what's required from the model.
- Can be used with node-style callbacks, promises and ES6 async/await.
- Fully RFC6749 and RFC6750 compliant.
- Implicitly supports any form of storage e.g. PostgreSQL, MySQL, Mongo, Redis, etc.
- Full test suite.
- Server options
- Model specification
- A simple password grant authorization example.
- A more complex password and refresh_token example.
- An advanced password, refresh_token and authorization_code (with scopes) example.
Upgrading from 2.x
This module has been rewritten with a promise-based approach and introduced a few changes in the model specification.
Please refer to our 3.0 migration guide for more information.