Skip to content

Commit 49905b8

Browse files
authored
Merge pull request #155 from pegasystems/bug/spr/BUG-813188
Bug/spr/bug 813188
2 parents 78400b6 + 47cd9ab commit 49905b8

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

packages/react-sdk-components/src/components/helpers/authManager.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -154,21 +154,21 @@ const initOAuth = (bInit) => {
154154
let sSI = sessionStorage.getItem("rsdk_CI");
155155
if( sSI ) {
156156
try {
157-
const oSI = JSON.parse(sSI);
158-
const aAttribs = ['authorizeUri', 'appAlias', 'clientId', 'authService', 'userIdentifier'];
159-
for( let i = 0; i<aAttribs.length; i += 1 ) {
160-
const attrib = aAttribs[i];
161-
const currValue = oSI[attrib];
162-
const newValue = authConfig[attrib];
163-
if( currValue !== newValue ) {
164-
// eslint-disable-next-line no-console
165-
console.log(`Clearing credentials due to mismatch for attribute: ${attrib};` +
166-
`currValue (${currValue}) does not match new desired value (${newValue})`);
167-
clearAuthMgr();
168-
sSI = null;
169-
break;
170-
}
157+
const oSI = JSON.parse(sSI);
158+
const aProps = ['authorizeUri', 'appAlias', 'clientId', 'authService', 'userIdentifier'];
159+
for( let i = 0; i < aProps.length; i += 1 ) {
160+
const prop = aProps[i];
161+
const currValue = oSI[prop];
162+
const newValue = authConfig[prop];
163+
if( currValue !== newValue ) {
164+
// eslint-disable-next-line no-console
165+
console.warn(`Clearing credentials due to mismatch for property: ${prop};` +
166+
`currValue (${currValue}) does not match new desired value (${newValue})`);
167+
clearAuthMgr();
168+
sSI = null;
169+
break;
171170
}
171+
}
172172
} catch(e) {
173173
// do nothing
174174
}

0 commit comments

Comments
 (0)