mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-20 23:16:55 +00:00
40 lines
1.2 KiB
TypeScript
40 lines
1.2 KiB
TypeScript
import { createFileRoute, linkOptions } from "@tanstack/react-router";
|
|
import { zodValidator } from "@tanstack/zod-adapter";
|
|
import { z } from "zod";
|
|
|
|
import { IntegrationsListPageTabs } from "@app/types/integrations";
|
|
|
|
import { AzureKeyVaultOauthCallbackPage } from "./AzureKeyVaultOauthCallback";
|
|
|
|
export const AzureKeyVaultOauthCallbackQueryParamsSchema = z.object({
|
|
state: z.string().catch(""),
|
|
code: z.coerce.string().catch("")
|
|
});
|
|
|
|
export const Route = createFileRoute(
|
|
"/_authenticate/_inject-org-details/_org-layout/projects/secret-management/$projectId/_secret-manager-layout/integrations/azure-key-vault/oauth2/callback"
|
|
)({
|
|
component: AzureKeyVaultOauthCallbackPage,
|
|
validateSearch: zodValidator(AzureKeyVaultOauthCallbackQueryParamsSchema),
|
|
beforeLoad: ({ context, params }) => {
|
|
return {
|
|
breadcrumbs: [
|
|
...context.breadcrumbs,
|
|
{
|
|
label: "Integrations",
|
|
link: linkOptions({
|
|
to: "/projects/secret-management/$projectId/integrations",
|
|
params,
|
|
search: {
|
|
selectedTab: IntegrationsListPageTabs.NativeIntegrations
|
|
}
|
|
})
|
|
},
|
|
{
|
|
label: "Azure Key Vault"
|
|
}
|
|
]
|
|
};
|
|
}
|
|
});
|