Skip to content

Commit

Permalink
Fix/prod redirect uri (#1391)
Browse files Browse the repository at this point in the history
* always use www in prod redirect uri

* add www replacement in tapis_oath call
  • Loading branch information
rstijerina authored Aug 7, 2024
1 parent 535b333 commit cccf53c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions designsafe/apps/auth/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ def tapis_oauth(request):
protocol = "http"

redirect_uri = f"{protocol}://{request.get_host()}{reverse('designsafe_auth:tapis_oauth_callback')}"
if request.get_host() == "designsafe-ci.org":
redirect_uri = redirect_uri.replace(
"designsafe-ci.org", "www.designsafe-ci.org"
)

tenant_base_url = getattr(settings, "TAPIS_TENANT_BASEURL")
client_id = getattr(settings, "TAPIS_CLIENT_ID")
Expand Down

0 comments on commit cccf53c

Please sign in to comment.