From 56049eb54dd0911371b78a35e6aca6a89dbb42d4 Mon Sep 17 00:00:00 2001 From: Sal Tijerina Date: Wed, 7 Aug 2024 09:28:00 -0500 Subject: [PATCH] always use www in prod redirect uri (#1388) --- designsafe/apps/auth/views.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/designsafe/apps/auth/views.py b/designsafe/apps/auth/views.py index 67d04f56ba..7c6ca04a43 100644 --- a/designsafe/apps/auth/views.py +++ b/designsafe/apps/auth/views.py @@ -98,6 +98,10 @@ def tapis_oauth_callback(request): else: 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" + ) code = request.GET["code"] body = {