fix(auth): give invite links a lifetime that fits an inbox
CI / build (push) Has been cancelled

Invite and welcome emails signed a 10-minute sign-in token, so the link was
usually dead by the time someone opened the mail and could never reach the
set-password page. Invitations now use a 7-day single-use token, while
requested sign-in links stay at 10 minutes. Expired or already-used links also
explain themselves on the sign-in page and point at requesting a fresh one.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
2026-11-22 17:38:15 +00:00
parent fac9b96cca
commit f75178de69
7 changed files with 77 additions and 13 deletions
+2 -2
View File
@@ -60,7 +60,7 @@ export async function sendWelcomeEmail(
<a href="${link}" style="display:inline-block;padding:10px 16px;background:#932822;color:#fff;border-radius:6px;text-decoration:none;">Sign in</a>
</p>
<p style="font-size: 12px; color: #6b7280;">
The link expires in 10 minutes and works once. If it has expired, open the
The link expires in 7 days and works once. If it has expired, open the
sign-in page and request a fresh link with this email address. After
signing in you can set a password from your profile.
</p>
@@ -75,7 +75,7 @@ export async function sendWelcomeEmail(
`Sign in: ${user.email}`,
`Username: ${user.username || user.email}`,
"",
`Open this link to sign in (expires in 10 minutes, single use):`,
`Open this link to sign in (expires in 7 days, single use):`,
url,
"",
"If it has expired, open the sign-in page and request a fresh link with this email address. After signing in you can set a password from your profile.",