diff --git a/src/routes/auth/__init__.py b/src/routes/auth/__init__.py index e819b1c0..b571c9bb 100644 --- a/src/routes/auth/__init__.py +++ b/src/routes/auth/__init__.py @@ -110,10 +110,11 @@ def _login(redirect_uri, key = 'tokens'): # create a response for the user response = make_response(redirect(redirect_uri)) + #Use max_age (seconds) as opposed to expires (date). Set token to expire after 1 day if current_app.config['COOKIE_DOMAIN'] == 'localhost': - response.set_cookie('info', base64_json_str, expires=2**31 - 1) + response.set_cookie('info', base64_json_str, max_age=86400) else: - response.set_cookie('info', base64_json_str, expires=2**31 - 1, domain=current_app.config['COOKIE_DOMAIN']) + response.set_cookie('info', base64_json_str, max_age=86400, domain=current_app.config['COOKIE_DOMAIN']) return response