Skip to main content

A standards compliant implementation of an OAuth 2.0 authorization server for Nodejs that utilizes JWT and Proof Key for Code Exchange (PKCE), written in TypeScript.

This package works with Cloudflare Workers, Node.js, Deno, Bun
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
58%
Published
3 weeks ago (4.0.3)

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

TypeScript OAuth2.0 Server

JSR NPM Version GitHub Workflow Status Test Coverage NPM Downloads

@jmondi/oauth2-server is a standards compliant implementation of an OAuth 2.0 authorization server written in TypeScript.

Requires node >= 18. Read the docs

The following RFCs are implemented:

Out of the box it supports the following grants:

Framework support:

The included adapters are just helper functions, any framework should be supported. Take a look at the adapter implementations to learn how you can create custom adapters for your favorite tool!

Example implementations:

Security

Version Latest Version Security Updates
4.x :tada: :tada:
3.x :tada: :tada:
2.x :tada:

Migration Guide

Thanks

This project is inspired by the PHP League's OAuth2 Server. Check out the PHP League's other packages for some other great PHP projects.

Star History

Star History Chart

Add Package

deno add jsr:@jmondi/oauth2-server

Import symbol

import * as oauth__server from "@jmondi/oauth2-server";

---- OR ----

Import directly with a jsr specifier

import * as oauth__server from "jsr:@jmondi/oauth2-server";

Add Package

npx jsr add @jmondi/oauth2-server

Import symbol

import * as oauth__server from "@jmondi/oauth2-server";

Add Package

yarn dlx jsr add @jmondi/oauth2-server

Import symbol

import * as oauth__server from "@jmondi/oauth2-server";

Add Package

pnpm dlx jsr add @jmondi/oauth2-server

Import symbol

import * as oauth__server from "@jmondi/oauth2-server";

Add Package

bunx jsr add @jmondi/oauth2-server

Import symbol

import * as oauth__server from "@jmondi/oauth2-server";