diff --git a/apps/webapp/app/components/integrations/SelectOAuthMethod.tsx b/apps/webapp/app/components/integrations/SelectOAuthMethod.tsx
index 737ee8acc..389d70012 100644
--- a/apps/webapp/app/components/integrations/SelectOAuthMethod.tsx
+++ b/apps/webapp/app/components/integrations/SelectOAuthMethod.tsx
@@ -12,9 +12,11 @@ import { Paragraph } from "../primitives/Paragraph";
export function SelectOAuthMethod({
integration,
organizationId,
+ callbackUrl
}: {
integration: Integration;
organizationId: string;
+ callbackUrl: string;
}) {
const oAuthMethods = Object.entries(integration.authenticationMethods).filter(
(a): a is [string, ApiAuthenticationMethodOAuth2] => a[1].type === "oauth2"
@@ -95,6 +97,7 @@ export function SelectOAuthMethod({
authMethodKey={oAuthKey}
organizationId={organizationId}
clientType={connectionType}
+ callbackUrl={callbackUrl}
/>
) : (
<>
diff --git a/apps/webapp/app/presenters/IntegrationsPresenter.server.ts b/apps/webapp/app/presenters/IntegrationsPresenter.server.ts
index e01e6998d..7d1e3410d 100644
--- a/apps/webapp/app/presenters/IntegrationsPresenter.server.ts
+++ b/apps/webapp/app/presenters/IntegrationsPresenter.server.ts
@@ -162,6 +162,7 @@ export class IntegrationsPresenter {
return {
clients: clientsWithConnections,
options,
+ callbackUrl: `${env.APP_ORIGIN}/oauth2/callback`
};
}
}
diff --git a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.integrations/route.tsx b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.integrations/route.tsx
index 7b9a39c27..e3f57cfcf 100644
--- a/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.integrations/route.tsx
+++ b/apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.integrations/route.tsx
@@ -74,7 +74,7 @@ export const handle: Handle = {
};
export default function Integrations() {
- const { clients, options } = useTypedLoaderData
();
+ const { clients, options, callbackUrl } = useTypedLoaderData();
const organization = useOrganization();
const project = useProject();
@@ -104,6 +104,7 @@ export default function Integrations() {
;
+ return ;
}