Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
feat: added copy token button
=883c7835a153
diff --git a/frontend/src/layouts/OrganizationLayout/components/MinimizedOrgSidebar/MinimizedOrgSidebar.tsx b/frontend/src/layouts/OrganizationLayout/components/MinimizedOrgSidebar/MinimizedOrgSidebar.tsxindex 1bde2688b3..e956556bbe 100644--- a/frontend/src/layouts/OrganizationLayout/components/MinimizedOrgSidebar/MinimizedOrgSidebar.tsx+++ b/frontend/src/layouts/OrganizationLayout/components/MinimizedOrgSidebar/MinimizedOrgSidebar.tsx@@ -23,6 +23,7 @@ import { useQueryClient } from "@tanstack/react-query";import { Link, linkOptions, useLocation, useNavigate, useRouter } from "@tanstack/react-router";import { Mfa } from "@app/components/auth/Mfa";+import { createNotification } from "@app/components/notifications";import { CreateOrgModal } from "@app/components/organization/CreateOrgModal";import SecurityClient from "@app/components/utilities/SecurityClient";import {@@ -49,6 +50,7 @@ import {} from "@app/hooks/api";import { authKeys } from "@app/hooks/api/auth/queries";import { MfaMethod } from "@app/hooks/api/auth/types";+import { getAuthToken } from "@app/hooks/api/reactQuery";import { SubscriptionPlan } from "@app/hooks/api/types";import { AuthMethod } from "@app/hooks/api/users/types";import { ProjectType } from "@app/hooks/api/workspace/types";@@ -159,6 +161,16 @@ export const MinimizedOrgSidebar = () => {}};+ const handleCopyToken = async () => {+ try {+ await window.navigator.clipboard.writeText(getAuthToken());+ createNotification({ type: "success", text: "Copied user organization token to clipboard" });+ } catch (error) {+ console.log(error);+ createNotification({ type: "error", text: "Failed to copy user token to clipboard" });+ }+ };+if (shouldShowMfa) {return (<div className="flex max-h-screen min-h-screen flex-col items-center justify-center gap-2 overflow-y-auto bg-gradient-to-tr from-mineshaft-600 via-mineshaft-800 to-bunker-700">@@ -595,6 +607,16 @@ export const MinimizedOrgSidebar = () => {</DropdownMenuItem></a><div className="mt-1 h-1 border-t border-mineshaft-600" />+ <DropdownMenuItem onClick={handleCopyToken}>+ Copy Token+ <Tooltip+ content="This token is scoped to your organization and can only access resources within it."+ className="max-w-3xl"+ >+ <FontAwesomeIcon icon={faInfoCircle} className="mb-[0.06rem] pl-1.5 text-xs" />+ </Tooltip>+ </DropdownMenuItem>+ <div className="mt-1 h-1 border-t border-mineshaft-600" /><DropdownMenuItem onClick={logOutUser} icon={<FontAwesomeIcon icon={faSignOut} />}>Log Out</DropdownMenuItem>