mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 21:27:10 +00:00
Fix Gitlab OAuth redirection issue with instanceUrls
This commit is contained in:
+7
-4
@@ -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
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user