Skip to content

[EAM-1675] Exchange token implementation#206

Open
purquijo wants to merge 5 commits into
masterfrom
EAM-1675
Open

[EAM-1675] Exchange token implementation#206
purquijo wants to merge 5 commits into
masterfrom
EAM-1675

Conversation

@purquijo

@purquijo purquijo commented Jun 6, 2024

Copy link
Copy Markdown
Contributor

Credits to Lulian.

@purquijo purquijo requested a review from LukaszPater June 21, 2024 14:24
Comment thread src/AuthWrapper.js Outdated

const handleTokens = (key, freshTokens) => {
tokens[key] = freshTokens;
console.log(tokens)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.log

Comment thread src/AuthWrapper.js Outdated
setTimeout(() => exchangeToken({ sourceClient, targetClient }), (response.data.expires_in - 20) * 1000);
return response.data;
} catch (_) {
console.log(_)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

console.log. Also, need better error handling.

Comment thread src/index.js Outdated
Comment on lines +32 to +37
const getClientID = ({url}) => {
if (url?.startsWith(process.env.REACT_APP_EAM_SERVICES_URL)) {
return process.env.REACT_APP_KEYCLOAK_EAM_SERVICES_CLIENTID;
} else return process.env.REACT_APP_KEYCLOAK_CLIENTID;
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There should be a better, more generic way to get the client id instead of a binary check

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants