Skip to content

Complete, compliant and well tested module for implementing an OAuth2 Server/Provider with express in node.js

License

Notifications You must be signed in to change notification settings

TendaDigital/node-oauth2-server

 
 

Repository files navigation

This project is seeking maintainers and reviewers

The currently released version is now significantly out of date. The project has been rewritten in typescript (#564), we're now working in the v5-dev branch and we're seeking further review, testing and documentation - any help with this popular project would be hugely appreciated, anyone providing consistent help will be promoted to collaborator.

oauth2-server

npm Version npm Downloads Test Status MIT Licensed oauthjs Slack

Complete, compliant and well tested module for implementing an OAuth2 server in Node.js.

Installation

npm install oauth2-server

The oauth2-server module is framework-agnostic but there are several officially supported wrappers available for popular HTTP server frameworks such as Express and Koa. If you're using one of those frameworks it is strongly recommended to use the respective wrapper module instead of rolling your own.

Features

  • Supports authorization_code, client_credentials, refresh_token and password grant, as well as extension grants, with scopes.
  • Can be used with promises, Node-style callbacks, ES6 generators and async/await (using Babel).
  • Fully RFC 6749 and RFC 6750 compliant.
  • Implicitly supports any form of storage, e.g. PostgreSQL, MySQL, MongoDB, Redis, etc.
  • Complete test suite.

Documentation

Documentation is hosted on Read the Docs.

Examples

Most users should refer to our Express or Koa examples.

More examples can be found here: https://github.com/14gasher/oauth-example

Upgrading from 2.x

This module has been rewritten using a promise-based approach, introducing changes to the API and model specification. v2.x is no longer supported.

Please refer to our 3.0 migration guide for more information.

Tests

To run the test suite, install dependencies, then run npm test:

npm install
npm test

About

Complete, compliant and well tested module for implementing an OAuth2 Server/Provider with express in node.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%