0.1.4 • Published 6 years ago

twinstage-client v0.1.4

Weekly downloads
3
License
ISC
Repository
github
Last release
6 years ago

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();
}
0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.1

6 years ago

0.1.0

6 years ago