> **Source:** https://knowledge.leegality.com/document-execution/settings/Department/document-security-settings > **Site:** Leegality Knowledge Base — https://knowledge.leegality.com > **About:** Leegality is a document execution platform covering eSigning, stamps, NeSL, workflows, and REST API integration. > **Navigation:** Every article on this site has a plain-text version at `.txt` (this format). To get an index of all articles with their `.txt` links, read: https://knowledge.leegality.com/llms.txt > **AI Guide:** For instructions on how to navigate this knowledge base as an AI agent, read: https://knowledge.leegality.com/ai-readable.txt --- # Document Security Settings ## Invitee authentication before accessing document This feature adds an extra layer of security to protect your documents from unauthorized access. They dictate whether invitee authentication is required before accessing the document. Once enabled, invitees undergo an OTP authentication process before viewing the document. ### Enforce invitee authentication before accessing document If enabled, these settings will apply to all of the documents sent from the account. 1. Click on the **Setting** ⚙️ icon on the top right corner. 2. Go to **Department > Document Security**. 3. There are two levels of authentication and you can choose any one: #### 1-Factor Authentication Invitees authenticate via OTP sent to their email address or phone number, as configured by the sender. #### 2-Factor Authentication Invitees authenticate via their email address as well as phone number. The sender provides both during the invitation process. > **Tip — 2-Factor Authentication Example** > > - The sender has provided the invitee's email address as well as phone number. > - The invitation link is sent via both email and SMS. > - If the invitee accesses the document link via email, the OTP is sent to the phone number for authentication. > - If the invitee accesses the document link via SMS, the OTP is sent to the email address for authentication. --- ## Auto Delete after Document Completion For enhanced security and automated document management, you can configure your account to automatically delete documents after they are completed. ### To set auto-delete document time duration: 1. Click on the **Setting** ⚙️ icon on the top right corner. 2. From the left navigation menu, go to **Department > Document Security**. 3. Enable **Enforce auto-delete after Document Completion** toggle. 4. Enter the number of days (from 7 to 365) that you wish to retain documents after completion before they are permanently deleted. > **Info — How it works** > > - If you enable auto-delete right now, it will only apply to documents you send from this point forward. It will not affect any documents that are already completed. > - If **enforce auto-delete on complete** is *Disabled* under **Department > Document Security** and a sender enables auto-delete from the **Signing Journey Options**, the completed document will be deleted after a default period of 7 days. > **Warning — Irreversible Action** > > Documents removed by the auto-delete feature are **permanently erased and cannot be recovered**. Please ensure you have downloaded and stored all necessary documents before the retention period ends. > **Info — note** > > Documents larger than 7 MB will not be shared as attachments via email. Instead, you will get a link in the email to download the signed agreement copy and audit trail.