开发者社区> 镜像站> NPM> auth0-autorenewing-token
auth0-autorenewing-token
A helper for auth0/node-auth0 that handles retrieving/renewing access tokens
Last updated 4 years ago by blakek .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install auth0-autorenewing-token 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.1.1                                ...           latest (4 years ago)

2 Versions

  • 0.1.1                                ...           4 years ago
  • 0.1.0                                ...           4 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 1
Last Month 1
Dependencies (1)
Dev Dependencies (8)
Dependents (0)
None