🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.
wip
Bill Yang20d6d77d2327
diff --git a/client/messages/cs.json b/client/messages/cs.jsonindex ced7ebe8b..72c4c6895 100644--- a/client/messages/cs.json+++ b/client/messages/cs.json@@ -195,8 +195,8 @@"Zx7WPP": "Všechny řady událostí skryty","AKRVhS": "Klikni na položku v legendě pro zobrazení","NuhCPH": "Zjisti, jak sledovat události",- "/aq5/F": "Žádné vlastní události nenalezeny","ES6IYH": "Zkus jiný časový rozsah nebo filtr",+ "/aq5/F": "Žádné vlastní události nenalezeny","j7BiRg": "Žádná událost nevybrána.","kF9XUo": "Časové razítko","EwRIOm": "Uživatel",@@ -601,8 +601,8 @@"zINlao": "Vlastník","iHN12u": "Administrátor","7L86Z5": "Člen",- "v+BwPW": "Přidat do organizace","Nvr5Ce": "Přidávám...",+ "v+BwPW": "Přidat do organizace","Msn3jj": "Filtrovat podle emailu...","gO9HzB": "Filtrovat podle role","9nrF+x": "Všechny role",@@ -851,8 +851,8 @@"EjE0iv": "","hfiE8k": "","DswPK3": "",- "U01dmA": "","97DGta": "",+ "U01dmA": "","03IKqU": "","Ps71bZ": "","k+kHlN": "",diff --git a/server/src/lib/auth.ts b/server/src/lib/auth.tsindex e5b2a9aa2..f26e420ac 100644--- a/server/src/lib/auth.ts+++ b/server/src/lib/auth.ts@@ -14,6 +14,7 @@ import { API_RATE_LIMIT_WINDOW, DISABLE_SIGNUP, IS_CLOUD, STANDARD_API_RATE_LIMIimport {addContactToAudience,sendChangeEmailVerification,+ sendEmailVerificationLink,sendInvitationEmail,sendOtpEmail,sendWelcomeEmail,@@ -112,6 +113,18 @@ export const auth = betterAuth({requireEmailVerification: false,disableSignUp: DISABLE_SIGNUP,},+ emailVerification: {+ sendVerificationEmail: async ({+ user,+ url,+ }: {+ user: { email: string };+ url: string;+ token: string;+ }) => {+ await sendEmailVerificationLink(user.email, url);+ },+ },socialProviders: {google: {clientId: process.env.GOOGLE_CLIENT_ID!,diff --git a/server/src/lib/email/email.ts b/server/src/lib/email/email.tsindex 614e8ce17..8486da8c5 100644--- a/server/src/lib/email/email.ts+++ b/server/src/lib/email/email.ts@@ -104,6 +104,21 @@ export const sendOtpEmail = async (email: string, otp: string, type: OtpEmailTypawait sendEmail(email, OTP_SUBJECTS[type], html);};+export const sendEmailVerificationLink = async (email: string, verificationUrl: string) => {+ const html = `+ <div style="font-family: Arial, sans-serif; max-width: 560px; margin: 0 auto; padding: 24px; color: #111;">+ <h2 style="margin: 0 0 16px;">Verify your email</h2>+ <p>Click the button below to verify this email address on your Rybbit account.</p>+ <p style="margin: 24px 0;">+ <a href="${verificationUrl}" style="background: #111; color: #fff; padding: 12px 20px; border-radius: 6px; text-decoration: none; display: inline-block;">Verify email</a>+ </p>+ <p style="font-size: 12px; color: #666; word-break: break-all;">Or paste this link into your browser: ${verificationUrl}</p>+ </div>+ `;++ await sendEmail(email, "Verify your Rybbit email", html);+};+export const sendChangeEmailVerification = async (currentEmail: string,newEmail: string,