# node-oauth2-server

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

Latest version **2.4.0** (published 2015-04-13) · 0 weekly downloads

## Install

```sh
npm install node-oauth2-server
pnpm add node-oauth2-server
yarn add node-oauth2-server
bun add node-oauth2-server
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.4.0 |
| Published | 2015-04-13 |
| First published | 2013-04-11 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.8 |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 49 |
| Author | Thom Seddon |
| Maintainers | thomseddon |
| Keywords | oauth, oauth2 |

## Links

- npm: https://www.npmjs.com/package/node-oauth2-server
- Repository: https://github.com/thomseddon/node-oauth2-server
- Issues: https://github.com/thomseddon/node-oauth2-server/issues
- npm.io page: https://npm.io/package/node-oauth2-server

## Dependencies (1)

- [basic-auth](https://npm.io/package/basic-auth.md) ~0.0.1

## Alternatives

- [@clerk/clerk-expo](https://npm.io/package/@clerk/clerk-expo.md) — 133.6K weekly downloads
- [@pothos/plugin-authz](https://npm.io/package/@pothos/plugin-authz.md) — 12.4K weekly downloads
- [@bounded-sh/client](https://npm.io/package/@bounded-sh/client.md) — 3.2K weekly downloads
- [@luigi-project/plugin-auth-oauth2](https://npm.io/package/@luigi-project/plugin-auth-oauth2.md) — 2.3K weekly downloads
- [@nocobase/plugin-verification](https://npm.io/package/@nocobase/plugin-verification.md) — 2.0K weekly downloads

## Recent versions

- 2.4.0 (latest) — 2015-04-13
- 2.2.2 — 2014-07-09
- 2.2.1 — 2014-06-12
- 2.2.0 — 2014-06-12
- 2.1.1 — 2014-05-29
- 2.1.0 — 2014-04-14
- 2.0.2 — 2014-02-28
- 2.0.1 — 2014-02-22
- 2.0.0 — 2014-02-14
- 2.0.0-rc2 — 2014-02-03
- 2.0.0-beta5 — 2014-01-17
- 2.0.0-beta4 — 2013-12-11
- 1.5.3 — 2013-11-06
- 2.0.0-beta3 — 2013-11-06
- 1.5.2 — 2013-11-05
- … 18 more at https://npm.io/package/node-oauth2-server/versions

## README

# oauth2-server

[![npm Version][npm-image]][npm-url]
[![npm Downloads][downloads-image]][downloads-url]
[![Test Status][travis-image]][travis-url]
[![MIT Licensed][license-image]][license-url]
[![oauthjs Slack][slack-image]][slack-url]

Complete, compliant and well tested module for implementing an OAuth2 server in [Node.js](https://nodejs.org).


## Installation

```bash
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](https://npmjs.org/package/express-oauth-server) and [Koa](https://npmjs.org/package/koa-oauth-server). 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](https://babeljs.io)).
- Fully [RFC 6749](https://tools.ietf.org/html/rfc6749.html) and [RFC 6750](https://tools.ietf.org/html/rfc6749.html) compliant.
- Implicitly supports any form of storage, e.g. *PostgreSQL*, *MySQL*, *MongoDB*, *Redis*, etc.
- Complete [test suite](https://github.com/oauthjs/node-oauth2-server/tree/master/test).


## Documentation

[Documentation](https://oauth2-server.readthedocs.io) is hosted on Read the Docs.


## Examples

Most users should refer to our [Express](https://github.com/oauthjs/express-oauth-server/tree/master/examples) or [Koa](https://github.com/oauthjs/koa-oauth-server/tree/master/examples) examples.

Examples for v3 are yet to be made. 

## 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](https://oauth2-server.readthedocs.io/en/latest/misc/migrating-v2-to-v3.html) for more information.


## Tests

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

```bash
npm install
npm test
```


[npm-image]: https://img.shields.io/npm/v/oauth2-server.svg
[npm-url]: https://npmjs.org/package/oauth2-server
[downloads-image]: https://img.shields.io/npm/dm/oauth2-server.svg
[downloads-url]: https://npmjs.org/package/oauth2-server
[travis-image]: https://img.shields.io/travis/oauthjs/node-oauth2-server/master.svg
[travis-url]: https://travis-ci.org/oauthjs/node-oauth2-server
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg
[license-url]: https://raw.githubusercontent.com/oauthjs/node-oauth2-server/master/LICENSE
[slack-image]: https://img.shields.io/badge/slack-join-E01563.svg
[slack-url]: https://oauthjs.slack.com

---
_Source: https://npm.io/package/node-oauth2-server · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
