TypeScript 97.5%
SQL 1.4%
Python 0.8%
1/**2 * Access-model helpers shared by Better Auth hooks, the session layer and the admin UI.3 * Pure functions only (no "server-only", no database) so they can be imported anywhere on the server.4 */56/** Emails listed in `ADMIN_EMAILS` (comma-separated, case-insensitive). */7export const adminEmails: readonly string[] = (process.env.ADMIN_EMAILS ?? "")8 .split(",")9 .map((s) => s.trim().toLowerCase())10 .filter(Boolean);1112export function normalizeEmail(email: string): string {13 return email.trim().toLowerCase();14}1516export function isAdminEmail(email: string): boolean {17 return adminEmails.includes(normalizeEmail(email));18}1920export const ACCESS_DENIED_MESSAGE = "This email is not on the access list. Ask your Fetcha administrator to invite you.";21