This is an implementation of the draft OAuth 2.0 Dynamic Client Registration Protocol.
yarn add oauth-dyn-reg
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.