Move CLIENT_ID envars to be fetched from backend for (cloud) integration options

This commit is contained in:
Tuan Dang
2022-12-18 16:10:58 -05:00
parent 1447e055d1
commit 200bb12ad8
11 changed files with 141 additions and 171 deletions
@@ -0,0 +1,21 @@
import SecurityClient from '~/utilities/SecurityClient';
const getIntegrationOptions = () => {
return SecurityClient.fetchCall(
'/api/v1/integration-auth/integration-options',
{
method: 'GET',
headers: {
'Content-Type': 'application/json'
}
}
).then(async (res) => {
if (res && res.status == 200) {
return (await res.json()).integrationOptions;
} else {
console.log('Failed to get (cloud) integration options');
}
});
};
export default getIntegrationOptions;