Comparing version 0.3.1 to 0.4.0
@@ -239,7 +239,7 @@ var request = require('request'); | ||
var options = { | ||
url: this.apiUrl + '/users/' + userId, | ||
url: this.apiUrl + '/users/' + userId + '/metadata', | ||
headers: { | ||
'Authorization': 'Bearer ' + accessToken, | ||
}, | ||
json: {metadata: metadata}, | ||
json: metadata, | ||
}; | ||
@@ -246,0 +246,0 @@ |
{ | ||
"name": "auth0", | ||
"version": "0.3.1", | ||
"version": "0.4.0", | ||
"description": "Client library for the Auth0 platform", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -116,2 +116,30 @@ Node.js client library for the Auth0 platform. | ||
### api.createUser(userData, callback) | ||
Creates a new user. `userData` is an object that must contain the following mandatory fields: | ||
* email: User's email | ||
* password: User's password | ||
* connection: The name of the connection where to create the user. | ||
Also, custom fields can be added with more information about the user. | ||
```js | ||
var newUser = { | ||
email: 'john@doe.com', | ||
password: 'somepass', | ||
connection: 'mydb', | ||
/* custom field */ | ||
favoriteColor: 'red' | ||
}; | ||
api.createUser(newUser, function (err, userInfo) { | ||
if (err) { | ||
console.log('Error creating user: ' + err); | ||
return; | ||
} | ||
console.log('User favorite color: ' + userInfo.favoriteColor); | ||
}); | ||
``` | ||
### api.updateUserMetadata(userId, metadata, callback) | ||
@@ -118,0 +146,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
30863
305
0
11
689