Finish v1 Azure Key Vault integration

This commit is contained in:
Tuan Dang
2023-02-06 17:57:47 +07:00
parent 1bd180596e
commit 68bf0b9efe
21 changed files with 560 additions and 49 deletions
+7 -1
View File
@@ -44,6 +44,7 @@ const handleOAuthExchangeHelper = async ({
}) => {
let action;
let integrationAuth;
let newIntegration;
try {
const bot = await Bot.findOne({
workspace: workspaceId,
@@ -100,7 +101,7 @@ const handleOAuthExchangeHelper = async ({
}
// initialize new integration after exchange
await new Integration({
newIntegration = await new Integration({
workspace: workspaceId,
isActive: false,
app: null,
@@ -113,6 +114,11 @@ const handleOAuthExchangeHelper = async ({
Sentry.captureException(err);
throw new Error('Failed to handle OAuth2 code-token exchange')
}
return ({
integrationAuth,
integration: newIntegration
});
}
/**
* Sync/push environment variables in workspace with id [workspaceId] to