KavachOS includes built-in tools for the three GDPR obligations that most commonly require custom code: giving users their data, deleting their account on request, and anonymizing audit trails.Documentation Index
Fetch the complete documentation index at: https://docs.kavachos.com/llms.txt
Use this file to discover all available pages before exploring further.
These tools cover the technical layer. Your privacy policy, data processing agreements, and response timelines are your responsibility.
Setup
lib/kavach.ts
Export user data
POST /auth/gdpr/export
Returns a JSON bundle of all data KavachOS holds for the authenticated user: profile, sessions, audit events, and any plugin-specific records.
Request export (client)
downloadUrl that expires after 24 hours instead of embedding the full payload.
Delete account
POST /auth/gdpr/delete
Permanently deletes the user account and all associated data. Sessions are revoked immediately. If requireDeletionConfirmation is true, the user must provide their password (or a confirmation token sent by email):
Delete account (client)
onBeforeDelete hook
lib/kavach.ts
Anonymize audit log
For cases where you need to retain audit records for compliance but cannot keep personal data, KavachOS can anonymize the audit log for a user without deleting it:Anonymize audit log (server)
Configuration reference
Require the user’s password before processing a deletion request.
onBeforeDelete
Async callback invoked before the user record is deleted. Use this to clean up app-level data.
Format for the data export response. ‘json’ returns inline data, ‘url’ returns a signed download URL.