Current Auth State

πŸ”“

Not Signed In

Click the "Sign In" button in the navbar or use the components below.

Clerk Components

Explore the pre-built authentication components. These are fully customisable and handle all auth flows automatically.

Protected Routes

This template includes protected demo pages that require authentication. Try visiting them to see route protection in action.

Quick Implementation Guide

1

Install Package

npm install svelte-clerk
2

Add Environment Variables

PUBLIC_CLERK_PUBLISHABLE_KEY=pk_test_...
CLERK_SECRET_KEY=sk_test_...
3

Create hooks.server.ts

import { withClerkHandler } from 'svelte-clerk/server';
export const handle = withClerkHandler();
4

Wrap Layout with ClerkProvider

<ClerkProvider>
  <!-- Your app content -->
</ClerkProvider>