Skip to content

Commit

Permalink
Merge pull request #163 from sennetconsortium/maxsibilla/idle-fix
Browse files Browse the repository at this point in the history
Maxsibilla/idle fix
  • Loading branch information
maxsibilla authored Oct 4, 2023
2 parents 58dcf3f + 7e34119 commit 7e84886
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/routes/auth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 7e84886

Please sign in to comment.