clerk-sveltekit is a JavaScript package that integrates Clerk authentication into a SvelteKit site. This demo site is included in the repo as an example and for end-to-end testing the package.
clerk-sveltekit offers server-based route protection, login flow, and the following Svelte components:
<ClerkLoading />
— Wrapper that shows its contents when Clerk is still loading.<ClerkLoaded let:clerk />
— Wrapper that shows its contents (and exposes theclerk
object) when Clerk is done loading.<SignIn />
— Renders a sign-in form.<SignUp />
— Renders a sign-up form.<SignedIn let:user />
— Wrapper that shows its contents (and exposes the Clerkuser
object) when the user is signed in.<SignedOut />
— Wrapper that shows its contents when the user is not signed in.<UserButton />
— Button that shows the user’s profile photo with log out link when they are signed in.