Complete, compliant and well tested module for implementing an OAuth2 Server/Provider with express in node.js
MIT License
Complete, compliant and well tested module for implementing an OAuth2 server in Node.js.
Note: After a period of hiatus, this project is now back under active maintenance. Dependencies have been updated and bug fixes will land in v3 (current master). v4 will be mostly backwards compatible with no code changes required for users using a supported node release. More details in #621.
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.
authorization_code
, client_credentials
, refresh_token
and password
grant, as well as extension grants, with scopes.Documentation is hosted on Read the Docs.
Most users should refer to our Express or Koa examples.
More examples can be found here: https://github.com/14gasher/oauth-example
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.
To run the test suite, install dependencies, then run npm test
:
npm install
npm test