From 98c9a3d72644b23f1d5d2b50bb068e6ee93f0dfa Mon Sep 17 00:00:00 2001 From: Steve Hobbs Date: Fri, 24 Jan 2020 17:19:04 +0000 Subject: [PATCH] Bumped version and rebuilt assets (#51) --- dist/angular-lock.js | 40 ++++++++++++++++++++-------------------- dist/angular-lock.min.js | 2 +- package.json | 2 +- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/dist/angular-lock.js b/dist/angular-lock.js index d98128b..6cfa225 100644 --- a/dist/angular-lock.js +++ b/dist/angular-lock.js @@ -1,10 +1,10 @@ (function() { - "use strict"; - angular.module("auth0.lock", []).provider("lock", lock); + 'use strict'; + angular.module('auth0.lock', []).provider('lock', lock); function lock() { - if (typeof Auth0Lock !== "function") { - throw new Error("Auth0Lock must be loaded."); + if (typeof Auth0Lock !== 'function') { + throw new Error('Auth0Lock must be loaded.'); } // Stub required functions to allow auth0-angular to initialize @@ -17,43 +17,43 @@ this.init = function(config) { if (!config) { - throw new Error("clientID and domain must be provided to lock"); + throw new Error('clientID and domain must be provided to lock'); } this.clientID = config.clientID; this.domain = config.domain; this.options = config.options || {}; this.options._telemetryInfo = { - name: "angular-lock", - version: "3.0.3" + name: 'angular-lock', + version: '3.0.4' }; }; this.$get = [ - "$rootScope", - "$location", + '$rootScope', + '$location', function($rootScope, $location) { var Lock = new Auth0Lock(this.clientID, this.domain, this.options); - var webAuthOptions = { + var webAuthOptions = { clientID: this.clientID, domain: this.domain, _telemetryInfo: this.options._telemetryInfo, _sendTelemetry: this.options._sendTelemetry - }; + }; var shouldVerifyIdToken = true; if (this.options._idTokenVerification === false) shouldVerifyIdToken = false; var lock = {}; var functions = []; for (var i in Lock) { - if (typeof Lock[i] === "function") { + if (typeof Lock[i] === 'function') { functions.push(i); } } function safeApply(fn) { var phase = $rootScope.$root.$$phase; - if (phase === "$apply" || phase === "$digest") { - if (fn && typeof fn === "function") { + if (phase === '$apply' || phase === '$digest') { + if (fn && typeof fn === 'function') { fn(); } } else { @@ -64,7 +64,7 @@ function wrapArguments(parameters) { var lastIndex = parameters.length - 1, func = parameters[lastIndex]; - if (typeof func === "function") { + if (typeof func === 'function') { parameters[lastIndex] = function() { var args = arguments; safeApply(function() { @@ -85,12 +85,12 @@ } lock.interceptHash = function() { - if (typeof auth0.WebAuth !== "function") { - throw new Error("Auth0.js version 8 or higher must be loaded"); + if (typeof auth0.WebAuth !== 'function') { + throw new Error('Auth0.js version 8 or higher must be loaded'); return; } - $rootScope.$on("$locationChangeStart", function(event, location) { + $rootScope.$on('$locationChangeStart', function(event, location) { if ( /id_token=/.test(location) || /access_token=/.test(location) || @@ -104,10 +104,10 @@ { hash: hash, _idTokenVerification: shouldVerifyIdToken }, function(err, authResult) { if (err) { - Lock.emit("authorization_error", err); + Lock.emit('authorization_error', err); } if (authResult && authResult.idToken) { - Lock.emit("authenticated", authResult); + Lock.emit('authenticated', authResult); } } ); diff --git a/dist/angular-lock.min.js b/dist/angular-lock.min.js index c436a77..55108fc 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.options._telemetryInfo={name:"angular-lock",version:"3.0.2"}},this.$get=["$rootScope","$location",function(t,o){function n(o){var n=t.$root.$$phase;"$apply"===n||"$digest"===n?o&&"function"==typeof o&&o():t.$apply(o)}function i(t){var o=t.length-1,i=t[o];return"function"==typeof i&&(t[o]=function(){var t=arguments;n(function(){i.apply(e,t)})}),t}var e=new Auth0Lock(this.clientID,this.domain,this.options),r={clientID:this.clientID,domain:this.domain,_telemetryInfo:this.options._telemetryInfo,_sendTelemetry:this.options._sendTelemetry},a=!0;!1===this.options._idTokenVerification&&(a=!1);var s={},c=[];for(var h in e)"function"==typeof e[h]&&c.push(h);for(var h=0;h