aboutsummaryrefslogtreecommitdiffstats
path: root/packages/trpc/email.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/trpc/email.ts')
-rw-r--r--packages/trpc/email.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/trpc/email.ts b/packages/trpc/email.ts
index b837656e..15e1ef74 100644
--- a/packages/trpc/email.ts
+++ b/packages/trpc/email.ts
@@ -55,8 +55,12 @@ export const sendVerificationEmail = withTracing(
email: string,
name: string,
token: string,
+ redirectUrl?: string,
) => {
- const verificationUrl = `${serverConfig.publicUrl}/verify-email?token=${encodeURIComponent(token)}&email=${encodeURIComponent(email)}`;
+ let verificationUrl = `${serverConfig.publicUrl}/verify-email?token=${encodeURIComponent(token)}&email=${encodeURIComponent(email)}`;
+ if (redirectUrl) {
+ verificationUrl += `&redirectUrl=${encodeURIComponent(redirectUrl)}`;
+ }
const mailOptions = {
from: serverConfig.email.smtp!.from,