twinstage-client
TypeScript icon, indicating that this package has built-in type declarations

0.1.4 • Public • Published

twinstage-client

twinstage npm package for client side frameworks

Usage

const ClientCredentialsProcess = require('twinstage-client').ClientCredentialsProcess;

let options = {
  authorization_url: env.TWINSTAGE_AUTHORIZATION_URL,
  client_id: env.TWINSTAGE_CLIENT_ID,
  client_secret: env.TWINSTAGE_CLIENT_SECRET,
  fetch_interval: 600   // every 10 minutes
};

async function main() {
  // create an instance of ClientCredentialsProcess and start
  // the background process
  let process = new ClientCredentialsProcess(options);
  process.start();

  // the access token would be available as a promise and can be requested as often as needed
  let accessToken = await process.waitToken();
}

Readme

Keywords

none

Package Sidebar

Install

npm i twinstage-client

Weekly Downloads

1

Version

0.1.4

License

ISC

Last publish

Collaborators

  • johnfliu