diff --git a/src/khoj/database/adapters/__init__.py b/src/khoj/database/adapters/__init__.py index 140680a4..82f3cda4 100644 --- a/src/khoj/database/adapters/__init__.py +++ b/src/khoj/database/adapters/__init__.py @@ -240,7 +240,7 @@ async def aget_or_create_user_by_email(email: str) -> tuple[KhojUser, bool]: if user: # Generate a secure 6-digit numeric code user.email_verification_code = f"{secrets.randbelow(1000000):06}" - user.email_verification_code_expiry = datetime.now(tz=timezone.utc) + timedelta(minutes=30) + user.email_verification_code_expiry = datetime.now(tz=timezone.utc) + timedelta(minutes=5) await user.asave() user_subscription = await Subscription.objects.filter(user=user).afirst() diff --git a/src/khoj/interface/email/magic_link.html b/src/khoj/interface/email/magic_link.html index f553a815..72a65679 100644 --- a/src/khoj/interface/email/magic_link.html +++ b/src/khoj/interface/email/magic_link.html @@ -18,7 +18,7 @@
Hi!
-Use this code (valid for 30 minutes) to login to Khoj:
+Use this code (valid for 5 minutes) to login to Khoj: