API Reference

@node-oauth/oauth2-server

OAuth 2.0 server implementation for Node.js with extensible grant types, token model, and authorization endpoint handling.

Official Documentation ↗
CompatibilityThis documentation covers version v5.2. Check the official docs for the latest API surface.

Installation

npmnpm install @node-oauth/oauth2-server

Methods

@node-oauth/oauth2-server is oauth 2.0 server implementation for node.js with extensible grant types, token model, and authorization endpoint handling. This page documents the core methods, installation, and common usage patterns for the current stable release.

Installation

Install @node-oauth/oauth2-server with your preferred package manager using the command shown in the frontmatter. The package is published to the npm registry and ships with TypeScript types where applicable.

Core methods

The methods listed in the frontmatter cover the primary API surface. Each signature reflects the v5.2 release. Consult the official documentation linked in sourceUrl for advanced options, edge cases, and breaking changes between major versions.

Frequently asked questions

The faq section in the frontmatter answers the most common questions about @node-oauth/oauth2-server, including comparisons with alternatives, configuration tips, and runtime requirements. If your question is not covered, check the source URL for the full guide.

FAQ

What grants are supported?
authorization_code, password, client_credentials, refresh_token, and custom grants via the model.
How do I implement the model?
Provide functions like getClient, saveToken, getAccessToken; the spec defines the required interface.
Is it Express-specific?
No. It takes Request/Response objects; adapt to any framework.