@como/como-client 0.7.84 → 0.7.85
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/como.js +14 -11
- package/package.json +1 -1
- package/src/como.js +3 -0
package/lib/como.js
CHANGED
|
@@ -268,12 +268,12 @@ var Como = function () {
|
|
|
268
268
|
break;
|
|
269
269
|
|
|
270
270
|
case 49:
|
|
271
|
-
_context2.next =
|
|
271
|
+
_context2.next = 74;
|
|
272
272
|
break;
|
|
273
273
|
|
|
274
274
|
case 51:
|
|
275
275
|
if (isExpired) {
|
|
276
|
-
_context2.next =
|
|
276
|
+
_context2.next = 74;
|
|
277
277
|
break;
|
|
278
278
|
}
|
|
279
279
|
|
|
@@ -281,7 +281,7 @@ var Como = function () {
|
|
|
281
281
|
|
|
282
282
|
case 53:
|
|
283
283
|
if (!(!signOnSuccessfully && interval < 3000)) {
|
|
284
|
-
_context2.next =
|
|
284
|
+
_context2.next = 74;
|
|
285
285
|
break;
|
|
286
286
|
}
|
|
287
287
|
|
|
@@ -299,38 +299,41 @@ var Como = function () {
|
|
|
299
299
|
console.log('signOn- updating credentials');
|
|
300
300
|
updateCredentials(_data2, true);
|
|
301
301
|
}
|
|
302
|
+
if (_data2 && _data2.config && _data2.config.recaptchaSiteKey) {
|
|
303
|
+
this.comoData.reCaptchaSiteKey = _data2.config.recaptchaSiteKey;
|
|
304
|
+
}
|
|
302
305
|
signOnSuccessfully = true;
|
|
303
|
-
_context2.next =
|
|
306
|
+
_context2.next = 72;
|
|
304
307
|
break;
|
|
305
308
|
|
|
306
|
-
case
|
|
307
|
-
_context2.prev =
|
|
309
|
+
case 65:
|
|
310
|
+
_context2.prev = 65;
|
|
308
311
|
_context2.t2 = _context2['catch'](54);
|
|
309
312
|
|
|
310
313
|
console.error('Failed signOn with accessToken, installationId:' + installationId + ', locationId:' + locationId + ', source:' + source + ',accessToken:' + accessToken + ', error:' + _context2.t2.message);
|
|
311
314
|
interval += 1000;
|
|
312
315
|
initService.logError({ method: 'signOn with credentials', accessToken: accessToken, isExpired: isExpired, refreshFailed: refreshFailed, credExist: credExist, installationId: installationId, locationId: locationId, source: source, refreshToken: refreshToken, interval: interval, error: _context2.t2.message });
|
|
313
|
-
_context2.next =
|
|
316
|
+
_context2.next = 72;
|
|
314
317
|
return new _promise2.default(function (r) {
|
|
315
318
|
return setTimeout(r, interval);
|
|
316
319
|
});
|
|
317
320
|
|
|
318
|
-
case
|
|
321
|
+
case 72:
|
|
319
322
|
_context2.next = 53;
|
|
320
323
|
break;
|
|
321
324
|
|
|
322
|
-
case
|
|
325
|
+
case 74:
|
|
323
326
|
if (!this.comoData.token) {
|
|
324
327
|
this.comoData.token = this.comoData.accessToken;
|
|
325
328
|
}
|
|
326
329
|
return _context2.abrupt('return', this.getCredentials());
|
|
327
330
|
|
|
328
|
-
case
|
|
331
|
+
case 76:
|
|
329
332
|
case 'end':
|
|
330
333
|
return _context2.stop();
|
|
331
334
|
}
|
|
332
335
|
}
|
|
333
|
-
}, _callee2, this, [[17, 24], [32, 40], [54,
|
|
336
|
+
}, _callee2, this, [[17, 24], [32, 40], [54, 65]]);
|
|
334
337
|
}));
|
|
335
338
|
|
|
336
339
|
function init(_x, _x2, _x3) {
|
package/package.json
CHANGED
package/src/como.js
CHANGED
|
@@ -143,6 +143,9 @@ class Como {
|
|
|
143
143
|
console.log(`signOn- updating credentials`);
|
|
144
144
|
updateCredentials(data, true);
|
|
145
145
|
}
|
|
146
|
+
if(data && data.config && data.config.recaptchaSiteKey){
|
|
147
|
+
this.comoData.reCaptchaSiteKey = data.config.recaptchaSiteKey;
|
|
148
|
+
}
|
|
146
149
|
signOnSuccessfully = true;
|
|
147
150
|
}catch(e){
|
|
148
151
|
console.error(`Failed signOn with accessToken, installationId:${installationId}, locationId:${locationId}, source:${source},accessToken:${accessToken}, error:${e.message}`);
|