feat: redesign match play and add broadcast tooling

This commit is contained in:
2026-09-29 02:52:56 +00:00
parent f417a831f7
commit 9b9aafefc1
348 changed files with 31588 additions and 11094 deletions

21
src/lib/auth-identity.ts Normal file
View File

@@ -0,0 +1,21 @@
/** Better Auth requires an email internally; this is never a contact address. */
export const AUTH_EMAIL_DOMAIN = 'identity.invalid';
export function contactEmail(value: string | null | undefined): string | null {
const email = value?.trim().toLowerCase();
if (!email || /@(?:osu\.local|discord\.local|identity\.invalid)$/.test(email)) return null;
return email;
}
export function newAuthIdentity(): string {
return `${crypto.randomUUID()}@${AUTH_EMAIL_DOMAIN}`;
}
export interface ConnectionProfile {
username: string;
image: string | null;
email: string | null;
emailVerified: boolean;
countryCode?: string | null;
globalRank?: number | null;
}