Fix Gitlab OAuth redirection issue with instanceUrls

This commit is contained in:
Carlos Monastyrski
2025-08-14 16:55:47 -07:00
parent 6cf978b593
commit 166104e523
@@ -36,7 +36,8 @@ type GithubFormData = BaseFormData &
type GithubRadarFormData = BaseFormData & type GithubRadarFormData = BaseFormData &
Pick<TGitHubRadarConnection, "name" | "method" | "description">; Pick<TGitHubRadarConnection, "name" | "method" | "description">;
type GitLabFormData = BaseFormData & Pick<TGitLabConnection, "name" | "method" | "description">; type GitLabFormData = BaseFormData &
Pick<TGitLabConnection, "name" | "method" | "description" | "credentials">;
type AzureKeyVaultFormData = BaseFormData & type AzureKeyVaultFormData = BaseFormData &
Pick<TAzureKeyVaultConnection, "name" | "method" | "description"> & Pick<TAzureKeyVaultConnection, "name" | "method" | "description"> &
@@ -147,7 +148,7 @@ export const OAuthCallbackPage = () => {
clearState(AppConnection.GitLab); clearState(AppConnection.GitLab);
const { connectionId, name, description, returnUrl, isUpdate } = formData; const { connectionId, name, description, returnUrl, isUpdate, credentials } = formData;
try { try {
if (isUpdate && connectionId) { if (isUpdate && connectionId) {
@@ -155,7 +156,8 @@ export const OAuthCallbackPage = () => {
app: AppConnection.GitLab, app: AppConnection.GitLab,
connectionId, connectionId,
credentials: { credentials: {
code: code as string code: code as string,
instanceUrl: credentials.instanceUrl as string
} }
}); });
} else { } else {
@@ -165,7 +167,8 @@ export const OAuthCallbackPage = () => {
description, description,
method: GitLabConnectionMethod.OAuth, method: GitLabConnectionMethod.OAuth,
credentials: { credentials: {
code: code as string code: code as string,
instanceUrl: credentials.instanceUrl as string
} }
}); });
} }