Skip to content

Commit

Permalink
send telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
glena committed Dec 5, 2016
1 parent a20a257 commit 40de6d8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
12 changes: 10 additions & 2 deletions src/core/web_api.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,21 @@ class Auth0WebAPI {
}

setupClient(lockID, clientID, domain, opts) {

const default_telemetry = {
name: 'lock.js',
version: __VERSION__,
lib_version: auth0.version
};

this.clients[lockID] = new auth0.WebAuth({
clientID: clientID,
domain: domain,
_sendTelemetry: true,
redirectUri: opts.redirectUrl,
responseMode: opts.responseMode,
responseType: opts.responseType
responseType: opts.responseType,
_sendTelemetry: opts._sendTelemetry === false ? false : true,
_telemetryInfo: opts._telemetryInfo || default_telemetry
});

this.authOpts[lockID] = {
Expand Down
8 changes: 2 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,8 @@ export default class Auth0Lock extends Core {
}

// telemetry
// Auth0Lock.version = __VERSION__;
// Auth0Lock.css = css;
// Auth0.clientInfo = {};
// Auth0.clientInfo.lib_version = Auth0.version;
// Auth0.clientInfo.name = "lock.js";
// Auth0.clientInfo.version = Auth0Lock.version;
Auth0Lock.version = __VERSION__;
Auth0Lock.css = css;

// TODO: should we have different telemetry for classic/passwordless?
// TODO: should we set telemetry info before each request?
Expand Down

0 comments on commit 40de6d8

Please sign in to comment.