diff options
Diffstat (limited to 'src/web/lib')
-rw-r--r-- | src/web/lib/user_utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/web/lib/user_utils.py b/src/web/lib/user_utils.py index d5c3da22..dfeb8dfa 100644 --- a/src/web/lib/user_utils.py +++ b/src/web/lib/user_utils.py @@ -1,7 +1,7 @@ from itsdangerous import URLSafeTimedSerializer - +import conf from bootstrap import application @@ -10,13 +10,13 @@ def generate_confirmation_token(email): return serializer.dumps(email, salt=application.config['SECURITY_PASSWORD_SALT']) -def confirm_token(token, expiration=3600): +def confirm_token(token): serializer = URLSafeTimedSerializer(application.config['SECRET_KEY']) try: email = serializer.loads( token, salt=application.config['SECURITY_PASSWORD_SALT'], - max_age=expiration + max_age=conf.TOKEN_VALIDITY_PERIOD ) except: return False |