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
minor text revisions/additions and add colors/icons to totp token expiry countdown
Scott Wilson9d618b4ae9ab
diff --git a/docs/documentation/platform/dynamic-secrets/totp.mdx b/docs/documentation/platform/dynamic-secrets/totp.mdxindex ca9b6eae1c..201a402e19 100644--- a/docs/documentation/platform/dynamic-secrets/totp.mdx+++ b/docs/documentation/platform/dynamic-secrets/totp.mdx@@ -7,7 +7,7 @@ The Infisical TOTP dynamic secret allows you to generate time-based one-time pas## Prerequisite-- Infisical requires either the OTP url or the secret key from the TOTP provider.+- Infisical requires either an OTP url or a secret key from a TOTP provider.## Set up Dynamic Secrets with TOTPdiff --git a/frontend/src/views/SecretMainPage/components/DynamicSecretListView/CreateDynamicSecretLease.tsx b/frontend/src/views/SecretMainPage/components/DynamicSecretListView/CreateDynamicSecretLease.tsxindex 21c71837d3..84fe76c2e9 100644--- a/frontend/src/views/SecretMainPage/components/DynamicSecretListView/CreateDynamicSecretLease.tsx+++ b/frontend/src/views/SecretMainPage/components/DynamicSecretListView/CreateDynamicSecretLease.tsx@@ -1,6 +1,6 @@import { ReactNode, useEffect, useState } from "react";import { Controller, useForm } from "react-hook-form";-import { faCheck, faCopy } from "@fortawesome/free-solid-svg-icons";+import { faCheck, faClock, faCopy } from "@fortawesome/free-solid-svg-icons";import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";import { zodResolver } from "@hookform/resolvers/zod";import { AnimatePresence, motion } from "framer-motion";@@ -95,11 +95,23 @@ const TotpOutputDisplay = ({}, [totp, remainingSeconds]);return (- <div>+ <div className="h-36"><OutputDisplay label="Time-based one-time password" value={totp} />- {remainingTime > 0 && (- <div>- Valid for {remainingTime} {remainingTime > 1 ? "seconds" : "second"}+ {remainingTime > 0 ? (+ <div+ className={`ml-2 flex items-center text-sm ${+ remainingTime < 10 ? "text-red-500" : "text-yellow-500"+ } transition-colors duration-500`}+ >+ <FontAwesomeIcon className="mr-1" icon={faClock} size="sm" />+ <span>+ Expires in {remainingTime} {remainingTime > 1 ? "seconds" : "second"}+ </span>+ </div>+ ) : (+ <div className="ml-2 flex items-center text-sm text-red-500">+ <FontAwesomeIcon className="mr-1" icon={faClock} size="sm" />+ Expired</div>)}{shouldShowRegenerate && (diff --git a/frontend/src/views/SecretMainPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretTotpForm.tsx b/frontend/src/views/SecretMainPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretTotpForm.tsxindex 07070ccea2..1e2e01c820 100644--- a/frontend/src/views/SecretMainPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretTotpForm.tsx+++ b/frontend/src/views/SecretMainPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretTotpForm.tsx@@ -295,6 +295,10 @@ export const EditDynamicSecretTotpForm = ({)}/></div>+ <p className="mb-8 text-sm font-normal text-gray-400">+ The period, digits, and algorithm values can remain at their defaults unless+ your TOTP provider specifies otherwise.+ </p></>)}</div>