Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 1.46 KB

File metadata and controls

48 lines (36 loc) · 1.46 KB

Clerk Authentication Setup Guide

Prerequisites

Before running your application with Clerk authentication, you need to:

  1. Create a Clerk Account

  2. Get Your Clerk Keys

    • In your Clerk dashboard, navigate to API Keys
    • Copy your Publishable Key (starts with pk_test_ or pk_live_)
  3. Configure Environment Variables

    • Copy .env.example to .env (if not already done)
    • Add your Clerk Publishable Key:
      VITE_CLERK_PUBLISHABLE_KEY=pk_test_c2VsZWN0LWNpY2FkYS0zMC5jbGVyay5hY2NvdW50cy5kZXYk
      NEXT_PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_c2VsZWN0LWNpY2FkYS0zMC5jbGVyay5hY2NvdW50cy5kZXYk
      CLERK_SECRET_KEY=sk_test_dnsubBJdAx3A7jzCN0ZYmOOMkglKcINH9lA1cvdeeY
      
  4. Apply Database Migration

    • Run the add_clerk_auth.sql script in your Supabase database
    • This adds user profiles and multi-user support

Running the Application

npm run dev

Features Enabled

✅ User sign-up and sign-in ✅ Protected routes (DataRoom, DocumentSharing) ✅ Public routes (Landing page, share links) ✅ User profile display ✅ Sign out functionality ✅ Document ownership tracking

Important Notes

  • Recipients do NOT need accounts to view documents via share links
  • Only the DataRoom and DocumentSharing pages require authentication
  • Existing documents without a user_id remain accessible via share links