@como/como-client
Advanced tools
Comparing version 0.7.99 to 0.8.0
{ | ||
"name": "@como/como-client", | ||
"version": "0.7.99", | ||
"version": "0.8.0", | ||
"description": "Client module for Como's loaylty API", | ||
@@ -5,0 +5,0 @@ "main": "src/como.js", |
@@ -112,2 +112,3 @@ const moment = require('moment-timezone'); | ||
const data = await this.comoData.initApi.refreshToken(installationId, refreshToken? refreshToken: 'none', locationId, source); | ||
console.log(`signOn with isExpired true result:${JSON.stringify(data)}`); | ||
updateCredentials(data, true); | ||
@@ -126,2 +127,3 @@ }catch(e){ | ||
const data = await this.comoData.initApi.signOn(installationId, locationId, source); | ||
console.log(`signOn with refreshFailed result:${JSON.stringify(data)}`); | ||
updateCredentials(data, true); | ||
@@ -180,3 +182,3 @@ credExist = true; | ||
this.comoData.expiresIn = credentials.expiresIn; | ||
if(credentials.config){ | ||
if (credentials && credentials.config) { | ||
this.comoData.reCaptchaSiteKey = credentials.config.recaptchaSiteKey; | ||
@@ -696,6 +698,6 @@ if (credentials.config.recaptcha) { | ||
const { | ||
accessToken, refreshToken, expiresIn, consent, locationId, recaptchaConfig, | ||
accessToken, refreshToken, expiresIn, consent, locationId, | ||
} = this.comoData; | ||
return { | ||
accessToken, refreshToken, expiresIn, consent, locationId, recaptchaConfig, | ||
accessToken, refreshToken, expiresIn, consent, locationId, | ||
}; | ||
@@ -702,0 +704,0 @@ } |
Sorry, the diff of this file is too big to display
233905
4955