Point Clerk to a custom sign-in route
Custom authentication UI
Clerk · Pipe
signInUrl tells Clerk where the client-side sign-in page is hosted. Configure it with the page's path or full URL so Clerk can target it for relevant redirects.
Set signInUrl to the full URL or path of the client-side sign-in page. Clerk uses it for redirects and, when applicable, for links that direct users to sign in.
signInUrl?: string| Name | Type | Description |
|---|---|---|
signInUrl | string | The full URL or path to the client-side sign-in page. |
import { ClerkProvider } from '@clerk/clerk-react';
export function App() {
return (
<ClerkProvider publishableKey={import.meta.env.VITE_CLERK_PUBLISHABLE_KEY} signInUrl="/sign-in">
{/* application routes */}
</ClerkProvider>
);
}Configure the provider with the path where the sign-in page is mounted.
Custom authentication UI
Client-side redirect configuration
Development satellite setup
signInUrl identifies the client-side URL or path for the application's sign-in page. Clerk uses it when redirects need to target the primary application.
Follow-up: When is it mandatory? It must be set for a satellite application in a development instance, while it is optional for production instances.
Use a route such as /sign-in or a full URL, depending on where the sign-in UI is hosted. The value should point to the primary client-side application.
Follow-up: What should replace a hard-coded route in deployment configuration? The documented recommendation is to use the environment variable instead.
For a custom sign-in page, configure signInUrl to the route hosting that page. The route can then be used by Clerk when a sign-in redirect is required.
Follow-up: How does this differ from signInFallbackRedirectUrl? The latter selects where users go after signing in, whereas signInUrl identifies the sign-in page itself.
<ClerkProvider><SignIn />signInFallbackRedirectUrlbuildSignInUrlclerkMiddleware()