Update reminders with info on urls option

This commit is contained in:
Konstantin Wohlwend 2026-06-08 12:33:56 -07:00
parent 96273a9d65
commit 48f498b416

View File

@ -18,6 +18,7 @@ export const remindersPrompt = deindent`
- Language, framework, and library-specific details:
- JavaScript & TypeScript:
- Hexclave has different SDK packages for different frameworks and languages. As of the time of writing these reminders, they are: @hexclave/js (JavaScript/TypeScript), @hexclave/next (Next.js), @hexclave/react (React), @hexclave/tanstack-start (TanStack Start). You can find all of these on npm. They are all versioned together, meaning that vX.Y.Z of one SDK was released at the same time as vX.Y.Z of another SDK. For the most part, they are the same, although each has platform-specific features and differences.
- The Hexclave/Stack Auth SDK constructor accepts a \`urls\` option that tells the SDK where auth pages and post-auth redirects live. When you add a custom auth page such as a \`sign-in\`, \`sign-up\`, \`forgot-password\`, \`account-settings\`, etc., update the corresponding \`urls\` key to point to that route; also set redirect targets such as \`afterSignIn\`, \`afterSignUp\`, \`afterSignOut\`, and \`home\` when those destinations are customized. The \`urls\` option is the source of truth for redirect helpers such as \`redirectToSignIn()\`, hosted or handler-page flows, and post-auth navigation; if it is left pointing at the default pages after custom pages are added, users can hit extra redirects, land on the wrong auth page, or return to an unexpected page after signing in or out.
- The \`Result<T, E>\` type is \`{ status: "ok", data: T } | { status: "error", error: E }\`.
- \`KnownErrors[KNOWN_ERROR_CODE]\` refers to a specific known error type. Each KnownError may have its own properties, but they all inherit from \`Error & { statusCode: number, humanReadableMessage: string, details?: Json }\`.
- React & Next.js: