From 2185df8eecc89b12b0a8e3fd2fce9f1e81c2be55 Mon Sep 17 00:00:00 2001 From: Dita Aji Pratama Date: Thu, 7 Aug 2025 10:02:12 +0700 Subject: [PATCH] Add invitation link expiration and invitation url on globalvar.py --- config/globalvar.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/config/globalvar.py b/config/globalvar.py index 8123515..c926719 100644 --- a/config/globalvar.py +++ b/config/globalvar.py @@ -24,7 +24,7 @@ reCAPTCHA = { verification_link_expiration = datetime.datetime.now() + datetime.timedelta(minutes=30) forgot_link_expiration = datetime.datetime.now() + datetime.timedelta(minutes=30) -# Can be hours or minutes +invitation_link_expiration = datetime.datetime.now() + datetime.timedelta(hours=48) baseurl = "https://domain.com" if production == False: @@ -46,3 +46,7 @@ def change_forgot_url(token): url = f"{baseurl}/reset?token={token}" return url +def invitation_url(token): + url = f"{baseurl}/accept?token={token}" + return url +