Skip to content

Implementation of draft OAuth 2.0 Dynamic Client Registration Protocol

License

Notifications You must be signed in to change notification settings

OADA/oauth-dyn-reg-js

Repository files navigation

oauth-dyn-reg

npm Downloads/week Coverage Status Dependency Status code style: prettier License

This is an implementation of the draft OAuth 2.0 Dynamic Client Registration Protocol.

Installation

yarn add oauth-dyn-reg

Usage

import register from 'oauth-dyn-reg';

const metadata = { /* See RFC section 2 for what goes here */ };
const registrationEndpoint = /* See RFC section 3 */;

// resp contains your client's registered metadata
const resp = await register(metadata, registrationEndpoint);
// !!!: resp may differ from metadata, the server MAY change values

An OAuth 2.0 token maybe optionally be given as a third parameter.

References

  1. OAuth 2.0 Dynamic Client Registration Protocol
  2. OAuth 2.0 Authorization Framework