<NavigateToSignIn/> component
<NavigateToSignIn /> is the redirect-only control component for the hosted sign-in path. It runs the navigation helper on mount and then gets out of the way.
Usage
The following example shows a basic usage of <NavigateToSignIn />.
import { SignedOut, NavigateToSignIn } from '@wacht/nextjs';export default function NavigateToSignInUsage() { return ( <> <SignedOut> <NavigateToSignIn /> </SignedOut> </> );}Behavior
Place it inside <SignedOut /> when a route should immediately hand off to hosted sign-in instead of rendering its own form.
It does not render visible UI on its own. The component exists only to trigger the redirect at the right time.
Redirect
The component reads the navigation helper from
useNavigation() and calls navigateToSignIn() in an effect as soon as it mounts.That keeps the redirect logic in one place and lets the deployment settings decide where the hosted sign-in page lives.