GitXplorerGitXplorer
p

oauth4webapi

public
566 stars
54 forks
1 issues

Commits

List of commits on branch main.
Unverified
1125cf2fdb20599f4fda3e560f0c541d3324d3c0

chore: cleanup after release

ggithub-actions[bot] committed 3 days ago
Unverified
5ebbc10a51ef8ad80a9b2d94e08937d030cca607

chore(release): 2.16.0

ppanva committed 3 days ago
Unverified
62795a6c1905cfbcbb19b4bd86e1eef2d773baa5

feat: add a hook for decrypting JWE assertions

ppanva committed 4 days ago
Unverified
30931ba3cec58c6eaa6139734f1a399b34885a7c

feat: allow to modify issued JWT headers and payloads before signing

ppanva committed 4 days ago
Unverified
006db55b3ddf6c4414edc21a5a9fbf358301192d

docs: update docs on useMtlsAlias

ppanva committed 3 days ago
Unverified
bec0d4033fee62a0edcbc604af8aaee25dacc71b

example: update fapi2-message-signing.ts to be using OpenID Connect

ppanva committed 4 days ago

README

The README file for this repository.

OAuth 2 / OpenID Connect for JavaScript Runtimes

This software provides a collection of routines that can be used to build client modules for OAuth 2.1, OAuth 2.0 with the latest Security Best Current Practices (BCP), and FAPI 2.0, as well as OpenID Connect where applicable. The primary goal of this software is to promote secure and up-to-date best practices while using only the capabilities common to both browser and non-browser JavaScript runtimes.

Features

The following features are currently in scope and implemented in this software:

  • Authorization Server Metadata discovery
  • Authorization Code Flow (profiled under OpenID Connect 1.0, OAuth 2.0, OAuth 2.1, and FAPI 2.0), with PKCE
  • Refresh Token, Device Authorization, and Client Credentials Grants
  • Demonstrating Proof-of-Possession at the Application Layer (DPoP)
  • Token Introspection and Revocation
  • Pushed Authorization Requests (PAR)
  • UserInfo and Protected Resource Requests
  • Authorization Server Issuer Identification
  • JWT Secured Introspection, Response Mode (JARM), Authorization Request (JAR), and UserInfo
  • Validating incoming JWT Access Tokens

OpenID Certification

Filip Skokan has certified that this software conforms to the Basic, FAPI 1.0, and FAPI 2.0 Relying Party Conformance Profiles of the OpenID Connect™ protocol.

Support from the community to continue maintaining and improving this module is welcome. If you find the module useful, please consider supporting the project by becoming a sponsor.

Dependencies: 0

oauth4webapi has no dependencies and it exports tree-shakeable ESM.

oauth4webapi is distributed via npmjs.com, jsr.io, deno.land/x, cdnjs.com, jsdelivr.com, and github.com.

example ESM import

import * as oauth from 'oauth4webapi'
  • Authorization Code Flow (OAuth 2.0) - source
  • Authorization Code Flow (OpenID Connect) - source | diff
  • Extensions
  • Client Authentication
    • Client Secret in HTTP Authorization Header - source
    • Client Secret in HTTP Body - source | diff
    • Private Key JWT Client Authentication - source | diff
    • Public Client - source | diff
  • Other Grants
  • FAPI

Supported Runtimes

The supported JavaScript runtimes include those that support the utilized Web API globals and standard built-in objects. These are (but are not limited to):

Out of scope

The following features are currently out of scope:

  • CommonJS
  • Implicit, Hybrid, and Resource Owner Password Credentials Flows
  • JSON Web Encryption (JWE)
  • Automatic polyfills of any kind