clerk-data-handling

Featured

Handle user data, privacy, and GDPR compliance with Clerk. Use when implementing data export, user deletion, or privacy compliance features. Trigger with phrases like "clerk user data", "clerk GDPR", "clerk privacy", "clerk data export", "clerk delete user".

AI & Automation 2,266 stars 315 forks Updated today MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Clerk Data Handling ## Overview Manage user data, implement privacy features, and ensure GDPR/CCPA compliance using the Clerk Backend API. Covers data export, right to be forgotten, consent management, and audit logging. ## Prerequisites - Clerk integration working - Understanding of GDPR/CCPA requirements - Database with user-related data linked by Clerk user IDs ## Instructions ### Step 1: User Data Export ```typescript // app/api/privacy/export/route.ts import { auth, clerkClient } from '@clerk/nextjs/server' export async function GET() { const { userId } = await auth() if (!userId) return Response.json({ error: 'Unauthorized' }, { status: 401 }) const client = await clerkClient() const clerkUser = await client.users.getUser(userId) // Gather data from Clerk const clerkData = { id: clerkUser.id, emails: clerkUser.emailAddresses.map((e) => e.emailAddress), firstName: clerkUser.firstName, lastName: clerkUser.lastName, createdAt: clerkUser.createdAt, lastSignInAt: clerkUser.lastSignInAt, publicMetadata: clerkUser.publicMetadata, } // Gather data from your database const appData = await db.user.findUnique({ where: { clerkId: userId }, include: { posts: true, comments: true, preferences: true }, }) return Response.json({ exportDate: new Date().toISOString(), clerkProfile: clerkData, applicationData: appData, }) } ``` ### Step 2: User Deletion (Right to be Forgotten) ```typescript // app/api/priv...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

klaviyo-data-handling

Implement Klaviyo data privacy, GDPR/CCPA compliance, and PII handling patterns. Use when handling profile data, implementing right-to-deletion, configuring data retention, or ensuring compliance with privacy regulations. Trigger with phrases like "klaviyo data", "klaviyo PII", "klaviyo GDPR", "klaviyo data retention", "klaviyo privacy", "klaviyo CCPA", "klaviyo delete profile", "klaviyo data privacy".

2,266 Updated today
jeremylongshore
AI & Automation Featured

clerk-migration-deep-dive

Migrate from other authentication providers to Clerk. Use when migrating from Auth0, Firebase, Supabase Auth, NextAuth, or custom authentication solutions. Trigger with phrases like "migrate to clerk", "clerk migration", "switch to clerk", "auth0 to clerk", "firebase auth to clerk".

2,266 Updated today
jeremylongshore
AI & Automation Featured

clerk-sdk-patterns

Common Clerk SDK patterns and best practices. Use when implementing authentication flows, accessing user data, or integrating Clerk SDK methods in your application. Trigger with phrases like "clerk SDK", "clerk patterns", "clerk best practices", "clerk API usage".

2,266 Updated today
jeremylongshore
AI & Automation Featured

hubspot-data-handling

Implement HubSpot GDPR compliance, data export, and contact privacy operations. Use when handling GDPR/CCPA data subject requests, implementing data export, contact deletion, or privacy-compliant HubSpot integrations. Trigger with phrases like "hubspot GDPR", "hubspot data export", "hubspot delete contact", "hubspot privacy", "hubspot CCPA", "hubspot PII".

2,266 Updated today
jeremylongshore
AI & Automation Featured

clerk-auth

Expert patterns for Clerk auth implementation, middleware, organizations, webhooks, and user sync

39,227 Updated today
sickn33