Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

auth0-api-tokens

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auth0-api-tokens - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

README_DEPRECATED.md

6

package.json
{
"name": "auth0-api-tokens",
"version": "1.1.0",
"version": "1.1.1",
"description": "Library that given a Auth0 global client credentials allows users to generate JWT tokens for API v2",

@@ -12,9 +12,9 @@ "main": "index.js",

"dependencies": {
"jsonwebtoken": "^4.2.2"
"jsonwebtoken": "^5.4.0"
},
"devDependencies": {
"chai": "^2.2.0",
"jws": "^2.0.0",
"jws": "^3.1.0",
"mocha": "^2.2.1"
}
}

@@ -1,46 +0,5 @@

# auth0-api-tokens ![build status](https://travis-ci.org/auth0/auth0-api-tokens.svg?branch=master)
# Deprecation notice
Library that given Auth0 global client credentials allows users to generate JWT tokens for API v2.
This library has been deprecated and is no longer supported. If you need a token for Auth0's Management API v2 you can instead execute a [client credentials flow](https://auth0.com/docs/api-auth/grant/client-credentials).
You can read more about API v2 tokens in [this blog post](https://auth0.com/blog/2014/12/02/using-json-web-tokens-as-api-keys/) and in the [API explorer](https://docs.auth0.com/apiv2).
## Installation
```
npm i auth0-api-tokens
```
## Usage
```js
var TOKEN_EXPIRATION_IN_SECONDS = 3600;
var createToken = require('auth0-api-tokens')({
clientId: '{YOUR_GLOBAL_CLIENT_ID}',
clientSecret: '{YOUR_GLOBAL_CLIENT_Secret}',
})
// each key is an entity, each array element is an action
var token = createToken({
scopes: {
users: ['read', 'write'],
clients: ['delete']
},
lifetimeInSeconds: TOKEN_EXPIRATION_IN_SECONDS
});
console.log(token); // 'ey...'
```
## Documentation
For more information about [auth0](http://auth0.com) contact our [documentation page](http://docs.auth0.com/).
## Issue Reporting
If you have found a bug or if you have a feature request, please report them at this repository issues section. Please do not report security vulnerabilities on the public GitHub issue tracker. The [Responsible Disclosure Program](https://auth0.com/whitehat) details the procedure for disclosing security issues.
## Author
[Auth0](auth0.com)
## License
This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.
[The original README is still available.](README_DEPRECATED.md)

@@ -28,3 +28,3 @@ var jwt = require('jsonwebtoken');

new Buffer(credentials.clientSecret, 'base64').toString('binary'), {
expiresInSeconds: lifetimeInSeconds,
expiresIn: lifetimeInSeconds,
audience: credentials.clientId,

@@ -34,2 +34,2 @@ noTimestamp: true // we generate it before for the `jti`

};
};
};

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc