+
+
+ The period, digits, and algorithm values can remain at their defaults unless
+ your TOTP provider specifies otherwise.
+
>
)}
diff --git a/frontend/src/views/SecretMainPage/components/DynamicSecretListView/DynamicSecretListView.tsx b/frontend/src/views/SecretMainPage/components/DynamicSecretListView/DynamicSecretListView.tsx
index 8953ab2bc..22057a90c 100644
--- a/frontend/src/views/SecretMainPage/components/DynamicSecretListView/DynamicSecretListView.tsx
+++ b/frontend/src/views/SecretMainPage/components/DynamicSecretListView/DynamicSecretListView.tsx
@@ -101,10 +101,20 @@ export const DynamicSecretListView = ({
role="button"
tabIndex={0}
onKeyDown={(evt) => {
+ // no lease view for TOTP because it's irrelevant
+ if (secret.type === DynamicSecretProviders.Totp) {
+ return;
+ }
+
if (evt.key === "Enter" && !isRevoking)
handlePopUpOpen("dynamicSecretLeases", secret.id);
}}
onClick={() => {
+ // no lease view for TOTP because it's irrelevant
+ if (secret.type === DynamicSecretProviders.Totp) {
+ return;
+ }
+
if (!isRevoking) {
handlePopUpOpen("dynamicSecretLeases", secret.id);
}
diff --git a/frontend/src/views/SecretMainPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretTotpForm.tsx b/frontend/src/views/SecretMainPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretTotpForm.tsx
index 8a9127e89..07070ccea 100644
--- a/frontend/src/views/SecretMainPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretTotpForm.tsx
+++ b/frontend/src/views/SecretMainPage/components/DynamicSecretListView/EditDynamicSecretForm/EditDynamicSecretTotpForm.tsx
@@ -40,7 +40,11 @@ const formSchema = z.object({
}),
z.object({
configType: z.literal(ConfigType.MANUAL),
- secret: z.string().min(1),
+ secret: z
+ .string()
+ .trim()
+ .min(1)
+ .transform((val) => val.replace(/\s+/g, "")),
period: z.number().optional(),
algorithm: z.nativeEnum(TotpAlgorithm).optional(),
digits: z.number().optional()
@@ -218,7 +222,7 @@ export const EditDynamicSecretTotpForm = ({
)}
/>
-