Clerk

Clerk Satellite Domain Demo

Authentication across different domains

Satellite Domain Homepage
The authentication flow will always initiate from the Primary domain

If you're trying this out locally, attempt to access a protected route on our Satellite domain athttps://clerk-multidomain-satellite.com/dashboard without logging in and see what happens. Clerk will redirect you to the Primary domain's sign in page set on https://clerk-multidomain-root.com/sign-in to authenticate you and redirect back to the Satellite once the authentication flow has successfully executed.

Production Environment

To see how this works in a production environment, head over to the Satellite Domain and try to access the dashboard page. Since this is a protected route defined in clerkMiddleware you'll see that you're redirected to authenticate on the Primary Domain and then redirected back to the Satellite domain after successfully completing the sign-in flow.

How It Works

  • Primary domain stores authentication state
  • Satellite domains read state securely
  • Seamless redirection between domains
  • Protected by clerkMiddleware
Primary Domain

The primary domain is where authentication state is stored and managed. Users sign in here first.

Satellite Domain

Satellite domains securely read authentication state from the primary domain without requiring re-authentication.

You are currently on this domain