auth0-autorenewing-token

0.1.1 • Public • Published

auth0-autorenewing-token

A helper for auth0/node-auth0 that handles retrieving/renewing access tokens

Build status Greenkeeper badge

Want to use the Auth0 Management API or the Authentication API, but don't want to renew access tokens yourself? Us too. That's why we made this.

Also, if you're using this, you probably want to check out Auth0's awesome auth0 (if you haven't already).

Usage

const RenewingToken = require('auth0-autorenewing-token')
 
const auth0Options = {
  domain: 'YOUR_DOMAIN.auth0.com',
  clientId: 'CLIENT_ID',
  clientSecret: 'SEEEECRET_BOX',
  audience: ''
}
 
const renewingToken = new RenewingToken(auth0Options)
 
renewingToken
  .getToken()
  .then(token => {
    /* use the token to make calls to the Management and/or Authentication APIs */
  })

Install

With either Yarn or npm installed, run one of the following:

# If using Yarn: 
yarn add auth0-autorenewing-token
 
# If using npm: 
npm install --save auth0-autorenewing-token
 

See Also

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.1
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.1
    1
  • 0.1.0
    0

Package Sidebar

Install

npm i auth0-autorenewing-token

Weekly Downloads

1

Version

0.1.1

License

MIT

Last publish

Collaborators

  • blakek