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

auth0

Package Overview
Dependencies
Maintainers
5
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auth0 - npm Package Compare versions

Comparing version 2.0.0-alpha.4 to 2.0.0-alpha.5

src/metadataUpdater.js

2

examples/updateAppMetadata.js
var token = '{YOUR_API_JSON_WEB_TOKEN}';
var auth0 = require('..')({ token: token });
auth0.user('google-oauth2|1234').appMetadata.update({
auth0.users.updateAppMetadata('google-oauth2|1234', {
rules: ['writer', 'reader'],

@@ -6,0 +6,0 @@ plan: null

var token = '{YOUR_API_JSON_WEB_TOKEN}';
var auth0 = require('..')({ token: token });
auth0.user('google-oauth2|1234').userMetadata.update({
auth0.users.updateUserMetadata('google-oauth2|1234', {
hobby: 'surf',

@@ -6,0 +6,0 @@ theme: 'green'

{
"name": "auth0",
"version": "2.0.0-alpha.4",
"version": "2.0.0-alpha.5",
"description": "node.js SDK for Auth0 API v2",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -7,3 +7,3 @@ # node-auth0 ![build status](https://travis-ci.org/auth0/node-auth0.svg?branch=v2)

npm install auth0@2.0.0-alpha.3
npm install auth0@2.0.0-alpha.5

@@ -46,3 +46,3 @@ ## Usage

var user_id = '...'
auth0.users(user_id).appMetadata.update({
auth0.users.updateAppMetadata(user_id, {
roles: ['reader']

@@ -60,3 +60,3 @@ }).then(function(user){

var user_id = '...'
auth0.users(user_id).appMetadata.update({
auth0.users.updateAppMetadata(user_id, {
roles: null

@@ -74,3 +74,3 @@ }, function(err, user){

var user_id = '...'
auth0.users(user_id).userMetadata.update({
auth0.users.updateUserMetadata(user_id,{
hobby: 'surf'

@@ -87,3 +87,3 @@ }).then(function(user){

var user_id = '...'
auth0.users(user_id).userMetadata.update({
auth0.users.updateUserMetadata(user_id,{
hobby: null

@@ -90,0 +90,0 @@ }, function(err, user){

@@ -1,3 +0,5 @@

var User = require('./user');
var Users = require('./users');
var util = require('util');
var utils = require('./utils');
var DEFAULT_REGION = 'us';

@@ -33,7 +35,4 @@ var BASE_URL_FORMAT = 'https://%s/api/v2';

Client.prototype.user = function(id){
// TODO: caching
return new User(this, id);
};
utils.subEntity(Client, 'users', Users);
module.exports = Client;

@@ -40,3 +40,3 @@ var expect = require('chai').expect;

auth0.user(user_id).appMetadata.update(update, function(err){
auth0.users.updateAppMetadata(user_id, update, function(err){
expect(err).to.not.be.undefined;

@@ -59,3 +59,3 @@ expect(err.statusCode).to.equal(401);

return auth0.user(user_id).appMetadata.update(update)
return auth0.users.updateAppMetadata(user_id, update)
.then(function(body){

@@ -62,0 +62,0 @@ expect(body.id).to.equal(user_id);

@@ -45,3 +45,3 @@ var expect = require('chai').expect;

it ('should perform request against correct domain', function(){
return auth0.user(user_id).appMetadata.update(update).catch(function(err){
return auth0.users.updateAppMetadata(user_id, update).catch(function(err){
expect(err).to.not.be.undefined;

@@ -92,3 +92,3 @@ expect(err.statusCode).to.equal(401);

it ('should perform request against correct domain', function(){
return auth0.user(user_id).appMetadata.update(update).catch(function(err){
return auth0.users.updateAppMetadata(user_id, update).catch(function(err){
expect(err).to.not.be.undefined;

@@ -95,0 +95,0 @@ expect(err.statusCode).to.equal(401);

@@ -40,3 +40,3 @@ var expect = require('chai').expect;

auth0.user(user_id).userMetadata.update(update, function(err){
auth0.users.updateUserMetadata(user_id, update, function(err){
expect(err).to.not.be.undefined;

@@ -57,3 +57,3 @@ expect(err.statusCode).to.equal(401);

return auth0.user(user_id).userMetadata.update(update)
return auth0.users.updateUserMetadata(user_id, update)
.then(function(body){

@@ -60,0 +60,0 @@ expect(body.id).to.equal(user_id);

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