Compare commits
3 Commits
e4fdbd81b0
...
3e85e6375f
Author | SHA1 | Date | |
---|---|---|---|
3e85e6375f | |||
2acb450b64 | |||
2185df8eec |
@ -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,11 @@ 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
|
||||
|
||||
allowed_invitation = [
|
||||
{ roles: 1, allowed: [1,2] },
|
||||
{ roles: 2, allowed: [2] },
|
||||
]
|
||||
|
@ -54,9 +54,10 @@ class auth:
|
||||
auth_profile_lastrowid = self.cursor.lastrowid
|
||||
self.cursor.execute("INSERT INTO `auth_profile_verification` VALUES (DEFAULT, %s, 'email', 0);", (auth_profile_lastrowid,) )
|
||||
self.cursor.execute("INSERT INTO `auth_profile_roles` VALUES (DEFAULT, %s, %s);", (auth_profile_lastrowid, result_roles['id']) )
|
||||
loggorilla.prcss(APIADDR, "Generate URL")
|
||||
loggorilla.prcss(APIADDR, "Set expired datetime")
|
||||
expired = globalvar.verification_link_expiration
|
||||
expired_isoformat = expired.isoformat()
|
||||
loggorilla.prcss(APIADDR, "Generate URL")
|
||||
payload = {
|
||||
"token" : token,
|
||||
"expired": expired_isoformat
|
||||
|
Loading…
Reference in New Issue
Block a user