diff --git a/backend/src/server/routes/v1/secret-sharing-router.ts b/backend/src/server/routes/v1/secret-sharing-router.ts index 6118d2753..653103938 100644 --- a/backend/src/server/routes/v1/secret-sharing-router.ts +++ b/backend/src/server/routes/v1/secret-sharing-router.ts @@ -153,7 +153,13 @@ export const registerSecretSharingRouter = async (server: FastifyZodProvider) => expiresAt: z.string(), expiresAfterViews: z.number().min(1).optional(), accessType: z.nativeEnum(SecretSharingAccessType).default(SecretSharingAccessType.Organization), - emails: z.string().email().array().max(100).optional() + emails: z + .string() + .email() + .array() + .max(100) + .optional() + .transform((val) => (val ? [...new Set(val)] : undefined)) }), response: { 200: z.object({ diff --git a/docs/documentation/platform/secret-sharing.mdx b/docs/documentation/platform/secret-sharing.mdx index 8701cdcbd..6c78359cd 100644 --- a/docs/documentation/platform/secret-sharing.mdx +++ b/docs/documentation/platform/secret-sharing.mdx @@ -20,18 +20,11 @@ Infisical offers a secure solution for sharing secrets over the internet in a ti - **Your Secret:** The secret content. - **Password (optional):** A password which will be required when viewing the secret. - - **Limit access to people within organization:** Only lets people within your organization view the secret. - - Enabling this feature requires secret viewers to log into Infisical. - - + - **Limit access to people within organization:** Only lets people within your organization view the secret. Enabling this feature requires secret viewers to log into Infisical. - **Expires In:** The time it'll take for the secret to expire. - **Max Views:** How many times the secret can be viewed before it's destroyed. - - **Authorized Emails (optional):** Emails which are authorized to view this secret. - - Enabling this feature requires secret viewers to log into Infisical. Each email will receive the shared secret link in their inbox after creation. - + - **Authorized Emails (optional):** Emails which are authorized to view this secret. Enabling this feature requires secret viewers to log into Infisical. Each email will receive the shared secret link in their inbox after creation. After creating the shared secret, its link will be displayed. Share this with the intended recipients.