Skip to content

Open source AI coding agent. Designed for large projects and real world tasks.

email verification pin updates

Dane Schneider1bc540532da8
diff --git a/app/cli/auth/account.go b/app/cli/auth/account.go
index 5d528ee4..a79cf57c 100644
--- a/app/cli/auth/account.go
+++ b/app/cli/auth/account.go
@@ -244,7 +244,7 @@ func verifyEmail(email, host string) (*verifyEmailRes, error) {
}, nil
}
- fmt.Println("✉️ You'll now receive a 6 character pin by email. It will be valid for 10 minutes.")
+ fmt.Println("✉️ You'll now receive a 6 character pin by email. It will be valid for 5 minutes.")
pin, err := term.GetUserPasswordInput("Please enter your pin:")
diff --git a/app/server/db/auth_helpers.go b/app/server/db/auth_helpers.go
index f37b2172..ad2ed929 100644
--- a/app/server/db/auth_helpers.go
+++ b/app/server/db/auth_helpers.go
@@ -72,8 +72,8 @@ func CreateEmailVerification(email string, userId, pinHash string) error {
return nil
}
-// email verifications expire in 10 minutes
-const emailVerificationExpirationMinutes = 10
+// email verifications expire in 5 minutes
+const emailVerificationExpirationMinutes = 5
const InvalidOrExpiredPinError = "invalid or expired pin"
diff --git a/app/server/email/verification.go b/app/server/email/verification.go
index b03151d8..d618c996 100644
--- a/app/server/email/verification.go
+++ b/app/server/email/verification.go
@@ -14,8 +14,12 @@ func SendVerificationEmail(email string, pin string) error {
if os.Getenv("GOENV") == "production" {
// Production environment - send email using AWS SES
subject := "Your Plandex Pin"
- htmlBody := fmt.Sprintf("<p>Hi there,</p><p>Welcome to Plandex! Your pin is:<br><br><strong>%s</strong></p><p>It will be valid for the next 10 minutes.</p>", pin)
- textBody := fmt.Sprintf("Hi there,\n\nWelcome to Plandex! Your pin is:\n\n%s\n\nIt will be valid for the next 10 minutes.", pin)
+ htmlBody := fmt.Sprintf(`<p>Hi there,</p>
+<p>Welcome to Plandex! Your pin is:<br><br>
+<strong style="font-size: 18px;">%s</strong></p>
+<p>It will be valid for the next 5 minutes.</p>
+<p style="color: #666; font-size: 12px; margin-top: 20px;">If you didn't request this, you can safely ignore the email.</p>`, pin)
+ textBody := fmt.Sprintf("Hi there,\n\nWelcome to Plandex! Your pin is:\n\n%s\n\nIt will be valid for the next 5 minutes.\n\nIf you didn't request this, you can safely ignore the email.", pin)
if os.Getenv("IS_CLOUD") == "" {
return sendEmailViaSMTP(email, subject, htmlBody, textBody)