Merge branch 'dev' into hosted-components-accounts-tab-fix

This commit is contained in:
Armaan Jain 2026-06-09 10:09:13 -07:00 committed by GitHub
commit c99980e447
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 0 deletions

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:

View File

@ -108,6 +108,7 @@ describe("handler URL targets", () => {
expect(urls.signIn).toBe("https://project-id.example-stack-hosted.test/handler/sign-in");
expect(urls.signOut).toBe("https://project-id.example-stack-hosted.test/handler/sign-out");
expect(urls.home).toBe("/");
expect(urls.afterSignIn).toBe("/");
expect(urls.afterSignUp).toBe("/");
expect(urls.afterSignOut).toBe("/");

View File

@ -121,6 +121,7 @@ const isRelativeUrlString = (url: string): boolean => {
};
const nonHostedHandlerNames = new Set<keyof HandlerUrls>([
"home",
"afterSignIn",
"afterSignUp",
"afterSignOut",