Skip to main content
Hexclave can render sign-in, sign-up, password reset, and the other auth pages in two ways. You pick the mode with the SDK urls option. You can also point individual keys (signIn, accountSettings, …) at a custom path or mix hosted and handler targets. See Setup for framework-specific wiring.

Prefer hosted components

For new projects, set:
With hosted components:
  • Users land on Hexclave-hosted auth pages that stay up to date automatically.
  • You do not need a /handler/[...] catch-all in your app for the default sign-in flow.
  • Redirect helpers such as redirectToSignIn() send people to those hosted pages, then back to your app.
This is the path Setup and the CLI onboarding flow recommend.

Own handler on your domain

Use a local handler when you want auth UI on your own origin (same cookies / branding constraints, or an older integration).
  1. Point urls.default at the handler component (this is also the SDK default if you omit urls.default):
  1. Mount the catch-all route your framework SDK documents — for Next.js:
app/handler/[...hexclave]/page.tsx
Auth URLs then look like /handler/sign-in, /handler/sign-up, and so on on your domain. The handler component is only available in some framework SDKs; hosted works everywhere the client SDK can redirect.
Older docs and reminders may say type: "handler". The current target is { type: "handler-component" }. Prefer type: "hosted" for new work.

Mixing and custom pages

You do not have to pick one mode for every page. Examples:
  • Keep default: { type: "hosted" }, but set accountSettings: "/settings" (or { type: "custom", url: "/settings", version: 0 }) for a page you own.
  • Keep most pages on the handler, but send signIn: { type: "hosted" } if you want only sign-in hosted.
Whenever you add a custom auth page, update the matching urls key and any post-auth redirects (afterSignIn, afterSignUp, afterSignOut, home). Those keys are the source of truth for redirectToSignIn() and related helpers — if they still point at defaults after you customize routes, users can hit extra redirects or land on the wrong page.