Files
causius/lib/auth/entry.ts
CatoandClaude 476a157cd8 feat(accounts): Causius has its own accounts; OrangeCat is one way in, not the only one (#23)
Email and password, a sign-in link, passkeys, two-step codes and (where
configured) the shared sign-in and OrangeCat, all from @bitbaum/accountkit/auth.
Matters made while OrangeCat was the only way in are re-keyed to the account the
same person signs in with. Live check and provisioning updated.


Claude-Session: https://claude.ai/code/session_01QDMxjTqKNLXETMYYuapMa3

Co-authored-by: Claude <noreply@anthropic.com>
2026-10-15 09:20:46 -07:00

19 lines
508 B
TypeScript

import { getPathname } from "@/i18n/navigation";
import { toLocale } from "@/i18n/routing";
import { ROUTES } from "@/lib/routes";
/** The link to the sign-in or sign-up screen, carrying where to come back to. */
export function entryHref(
mode: "sign-in" | "sign-up",
locale: string,
from?: string,
): string {
return getPathname({
href: {
pathname: mode === "sign-up" ? ROUTES.signUp : ROUTES.signIn,
query: from ? { next: from } : {},
},
locale: toLocale(locale),
});
}