From 372436c3df9898bb925c658efc1b733560cc05f7 Mon Sep 17 00:00:00 2001 From: Ryan Chenkie Date: Tue, 24 Jan 2017 18:50:46 -0500 Subject: [PATCH] fix: emit err instead of authResult --- angular-lock.js | 2 +- bower.json | 2 +- dist/angular-lock.js | 2 +- dist/angular-lock.min.js | 2 +- package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/angular-lock.js b/angular-lock.js index 95a8946..817e9c3 100644 --- a/angular-lock.js +++ b/angular-lock.js @@ -86,7 +86,7 @@ webAuth.parseHash({ hash: hash }, function(err, authResult) { if (err) { - Lock.emit('authorization_error', authResult); + Lock.emit('authorization_error', err); } if (authResult && authResult.idToken) { Lock.emit('authenticated', authResult); diff --git a/bower.json b/bower.json index 130c6d9..7ea2158 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angular-lock", - "version": "2.0.0-beta.0", + "version": "2.0.0-beta.1", "main": "angular-lock.js", "dependencies": { "angular": "*", diff --git a/dist/angular-lock.js b/dist/angular-lock.js index 95a8946..817e9c3 100644 --- a/dist/angular-lock.js +++ b/dist/angular-lock.js @@ -86,7 +86,7 @@ webAuth.parseHash({ hash: hash }, function(err, authResult) { if (err) { - Lock.emit('authorization_error', authResult); + Lock.emit('authorization_error', err); } if (authResult && authResult.idToken) { Lock.emit('authenticated', authResult); diff --git a/dist/angular-lock.min.js b/dist/angular-lock.min.js index 040bc73..f7d061e 100644 --- a/dist/angular-lock.min.js +++ b/dist/angular-lock.min.js @@ -1 +1 @@ -!function(){"use strict";function t(){if("function"!=typeof Auth0Lock)throw new Error("Auth0Lock must be loaded.");Auth0Lock.prototype.getClient=function(){},Auth0Lock.prototype.parseHash=function(){},this.init=function(t){if(!t)throw new Error("clientID and domain must be provided to lock");this.clientID=t.clientID,this.domain=t.domain,this.options=t.options||{}},this.$get=["$rootScope",function(t){function o(o){var n=t.$root.$$phase;"$apply"===n||"$digest"===n?o&&"function"==typeof o&&o():t.$apply(o)}function n(t){var n=t.length-1,e=t[n];return"function"==typeof e&&(t[n]=function(){var t=arguments;o(function(){e.apply(i,t)})}),t}var i=new Auth0Lock(this.clientID,this.domain,this.options),e={clientID:this.clientID,domain:this.domain},r={},a=[];for(var u in i)"function"==typeof i[u]&&a.push(u);for(var u=0;u