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:- 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.
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).- Point
urls.defaultat the handler component (this is also the SDK default if you omiturls.default):
- Mount the catch-all route your framework SDK documents — for Next.js:
app/handler/[...hexclave]/page.tsx
/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 setaccountSettings: "/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.
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.
Related
- Setup — framework setup, including the hosted
urlsdefault. - Authentication overview — what the Authentication app covers.
- Local vs. Cloud Dashboard — development environment vs cloud project.