Skip to content

Commit

Permalink
Merge pull request #134 from sennetconsortium/libpitt/131-auth
Browse files Browse the repository at this point in the history
Adding new configuration for domain set by cookie
  • Loading branch information
maxsibilla authored Aug 29, 2023
2 parents 6b2682c + d24f145 commit 9aa5ad5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/instance/app.cfg.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ GLOBUS_ADMIN_FILE_USER_NAME = 'shirey'
GLOBUS_GENOMIC_DATA_FILE_GROUP_NAME = 'hubseq'
GLOBUS_CONSORTIUM_FILE_GROUP_NAME = 'hubmap'

#Sets the domain for the cookie set upon login to the portal. Use `localhost` for local development
COOKIE_DOMAIN = '.sennetconsortium.org'

#Entity-api
ENTITY_WEBSERVICE_URL = 'http://entity-api:8080'

Expand Down
2 changes: 1 addition & 1 deletion src/routes/auth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ 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='.sennetconsortium.org')
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 9aa5ad5

Please sign in to comment.