Problem
The resendEmailVerificationToken method in email-verification.service.ts hardcodes EmailVerificationTrigger.SIGN_UP when calling sendVerificationEmail().
While the sendVerificationEmail method already supports both SIGN_UP and EMAIL_UPDATE triggers (with different email subjects), the resend flow cannot differentiate between a signup verification resend and an email update verification resend.
Impact: When a user updates their email and requests a resend, they receive "Welcome to Twenty: Please Confirm Your Email" instead of "Please confirm your updated email" — incorrect branding and user confusion.
Root Cause
resendEmailVerificationToken (line 179) does not accept a verificationTrigger parameter:
await this.sendVerificationEmail({
userId: user.id,
email,
workspace,
locale,
verificationTrigger: EmailVerificationTrigger.SIGN_UP, // hardcoded
});
Solution
- Add optional verificationTrigger field to ResendEmailVerificationTokenInput (default: SIGN_UP)
- Pass verificationTrigger from resolver to service
- Use the parameter in resendEmailVerificationToken instead of hardcoded value
Problem
The resendEmailVerificationToken method in email-verification.service.ts hardcodes EmailVerificationTrigger.SIGN_UP when calling sendVerificationEmail().
While the sendVerificationEmail method already supports both SIGN_UP and EMAIL_UPDATE triggers (with different email subjects), the resend flow cannot differentiate between a signup verification resend and an email update verification resend.
Impact: When a user updates their email and requests a resend, they receive "Welcome to Twenty: Please Confirm Your Email" instead of "Please confirm your updated email" — incorrect branding and user confusion.
Root Cause
Solution