mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 19:28:09 +00:00
fix: resolved project list issue and app connection github not listed
This commit is contained in:
@@ -151,7 +151,7 @@ export const useGetUserWorkspaces = ({
|
|||||||
type?: ProjectType | "all";
|
type?: ProjectType | "all";
|
||||||
} = {}) =>
|
} = {}) =>
|
||||||
useQuery({
|
useQuery({
|
||||||
queryKey: workspaceKeys.getAllUserWorkspace(),
|
queryKey: workspaceKeys.getAllUserWorkspace(type),
|
||||||
queryFn: () => fetchUserWorkspaces(includeRoles, type)
|
queryFn: () => fetchUserWorkspaces(includeRoles, type)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,18 +1,21 @@
|
|||||||
import { createFileRoute } from "@tanstack/react-router";
|
import { createFileRoute, stripSearchParams } from "@tanstack/react-router";
|
||||||
import { zodValidator } from "@tanstack/zod-adapter";
|
import { zodValidator } from "@tanstack/zod-adapter";
|
||||||
import { z } from "zod";
|
import { z } from "zod";
|
||||||
|
|
||||||
import { GitHubOAuthCallbackPage } from "./GithubOauthCallbackPage";
|
import { GitHubOAuthCallbackPage } from "./GithubOauthCallbackPage";
|
||||||
|
|
||||||
const GitHubOAuthCallbackPageQueryParamsSchema = z.object({
|
const GitHubOAuthCallbackPageQueryParamsSchema = z.object({
|
||||||
code: z.string(),
|
code: z.string().catch(""),
|
||||||
state: z.string(),
|
state: z.string().catch(""),
|
||||||
installation_id: z.string()
|
installation_id: z.string().catch("")
|
||||||
});
|
});
|
||||||
|
|
||||||
export const Route = createFileRoute(
|
export const Route = createFileRoute(
|
||||||
"/_authenticate/_inject-org-details/organization/_layout/app-connections/github/oauth/callback"
|
"/_authenticate/_inject-org-details/organization/_layout/app-connections/github/oauth/callback"
|
||||||
)({
|
)({
|
||||||
component: GitHubOAuthCallbackPage,
|
component: GitHubOAuthCallbackPage,
|
||||||
validateSearch: zodValidator(GitHubOAuthCallbackPageQueryParamsSchema)
|
validateSearch: zodValidator(GitHubOAuthCallbackPageQueryParamsSchema),
|
||||||
|
search: {
|
||||||
|
middlewares: [stripSearchParams({ state: "", installation_id: "" })]
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
+1
-1
@@ -74,7 +74,7 @@ export const GitHubConnectionForm = ({ appConnection }: Props) => {
|
|||||||
break;
|
break;
|
||||||
case GitHubConnectionMethod.OAuth:
|
case GitHubConnectionMethod.OAuth:
|
||||||
window.location.assign(
|
window.location.assign(
|
||||||
`https://github.com/login/oauth/authorize?client_id=${oauthClientId}&response_type=code&scope=repo,admin:org&redirect_uri=${window.location.origin}/app-connections/github/oauth/callback&state=${state}`
|
`https://github.com/login/oauth/authorize?client_id=${oauthClientId}&response_type=code&scope=repo,admin:org&redirect_uri=${window.location.origin}/organization/app-connections/github/oauth/callback&state=${state}`
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user