Skip to content

Commit

Permalink
Merge pull request #98 from jcenturion/bug-fixing
Browse files Browse the repository at this point in the history
Adding node polyfills for web bundle
  • Loading branch information
ntotten committed May 19, 2016
2 parents 0f025d3 + 33d66b8 commit 230a55e
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "auth0",
"version": "2.1.0",
"version": "2.2.0",
"description": "SDK for Auth0 API v2",
"main": "src/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/auth/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ var AuthenticationClient = function (options) {
};

if (options.telemetry !== false) {
var telemetry = jsonToBase64(this.getClientInfo());
var telemetry = jsonToBase64(options.clientInfo || this.getClientInfo());
managerOptions.headers['Auth0-Client'] = telemetry;
}

Expand Down
4 changes: 2 additions & 2 deletions src/management/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ var ManagementClient = function (options) {
};

if (options.telemetry !== false) {
var telemetry = jsonToBase64(this.getClientInfo());
var telemetry = jsonToBase64(options.clientInfo || this.getClientInfo());

managerOptions.headers['Auth0-Client'] = telemetry;
}

Expand Down Expand Up @@ -188,7 +189,6 @@ ManagementClient.prototype.getClientInfo = function () {
version: process.version.replace('v', '')
}]
};

// Add the dependencies to the client info object.
Object
.keys(pkg.dependencies)
Expand Down
8 changes: 6 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ module.exports = {
library: 'Auth0',
libraryTarget: 'umd',
},
node: {
Buffer: true,
process: true,
url: true
},
module: {
loaders: [
{
Expand Down Expand Up @@ -46,6 +51,5 @@ module.exports = {
modulesDirectories: ['node_modules'],
root: __dirname,
alias: {},
},
node: false
}
};

0 comments on commit 230a55e

Please sign in to comment.