mirror of
https://github.com/bitbaum/causius.git
synced 2026-12-04 05:07:50 +01:00
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>
19 lines
508 B
TypeScript
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),
|
|
});
|
|
}
|