mirror of
https://github.com/bitbaum/fleet.git
synced 2026-12-06 07:17:26 +01:00
The account mails stay this app's own words, in the reader's language, with
HTML: the template is handed to createAuthMailer({ render, codes: true })
(AccountKit 0.26.1). The shared mailer checks the link's origin, skips
addresses that cannot receive mail and puts a six-digit code in the sign-in
link's email, which the template prints ("On another device? Type this
code ..."). The sign-in page then offers the field for it.
Claude-Session: https://claude.ai/code/session_019MDtmuJhiHPASaR5k8raL9
Co-authored-by: Claude <noreply@anthropic.com>
12 lines
477 B
TypeScript
12 lines
477 B
TypeScript
import { createAuthRuntime } from "@bitbaum/accountkit/auth/next";
|
|
import { getDb, isDatabaseConfigured } from "@/lib/db/client";
|
|
import { authMail } from "@/lib/mail";
|
|
import { SITE } from "@/lib/site";
|
|
export const { GET, POST, getSession, requireUser, getAuth, authStatus } = createAuthRuntime({
|
|
site: { url: SITE.url, title: SITE.title, slug: SITE.slug },
|
|
getDatabase: getDb,
|
|
isDatabaseConfigured,
|
|
mail: authMail,
|
|
});
|
|
export type Auth = ReturnType<typeof getAuth>;
|