Skip to content

Commit

Permalink
Fixed merge issue
Browse files Browse the repository at this point in the history
  • Loading branch information
abuturla committed Apr 17, 2018
1 parent 29ba7d7 commit 63fce48
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/widget/formatSSO.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
export const formatSSO = (url, ssoUserString) => {
let userToken = '';
if (ssoUserString) {
const ssoUserObj = JSON.parse(ssoUserString);
const tokenExists = ssoUserObj.accessToken;
return url.replace('{{SSO}}', tokenExists
? decodeURIComponent(ssoUserObj.accessToken)
: '');
}

if (ssoUserString) {
const ssoUserObj = JSON.parse(ssoUserString);

userToken = (tokenExists)
? decodeURIComponent(ssoUserObj.accessToken)
: '';
}

return url.replace('{{SSO}}', userToken);
};
return url.replace('{{SSO}}', '');
};

0 comments on commit 63fce48

Please sign in to comment.