Skip to content

Commit

Permalink
Adding fix for localhost domain not being set
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsibilla committed Oct 2, 2023
1 parent f62730f commit 14088d0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/routes/auth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ def _login(redirect_uri, key = 'tokens'):

# create a response for the user
response = make_response(redirect(redirect_uri))
response.set_cookie('info', base64_json_str, expires=2**31 - 1, domain=current_app.config['COOKIE_DOMAIN'])
if current_app.config['COOKIE_DOMAIN'] == 'localhost':
response.set_cookie('info', base64_json_str, expires=2**31 - 1)
else:
response.set_cookie('info', base64_json_str, expires=2**31 - 1, domain=current_app.config['COOKIE_DOMAIN'])
return response


Expand Down

0 comments on commit 14088d0

Please sign in to comment.