auth0-autorenewing-token
A helper for auth0/node-auth0 that handles retrieving/renewing access tokens
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 => {
})
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