π₯π₯π₯ Open-source Jira, Linear, Monday, and ClickUp alternative. Plane is a modern project management platform to manage tasks, sprints, docs, and triage.
TypeScript boardsbug-trackerdjangodockerganttissue-trackerjirajira-alternativekanbanlinearpostgresqlproduct-managementproject-managementproject-planningpythonreactredistypesciptvitework-management
[WEB-4900] refactor: remove base_host retrieval from authentication views (#7804)
Nikhil56d3a9e049ed
diff --git a/apps/api/plane/authentication/views/app/github.py b/apps/api/plane/authentication/views/app/github.pyindex 425f125499..35c4d2121b 100644--- a/apps/api/plane/authentication/views/app/github.py+++ b/apps/api/plane/authentication/views/app/github.py@@ -60,7 +60,6 @@ class GitHubCallbackEndpoint(View):def get(self, request):code = request.GET.get("code")state = request.GET.get("state")- base_host = request.session.get("host")next_path = request.session.get("next_path")if state != request.session.get("state", ""):diff --git a/apps/api/plane/authentication/views/app/gitlab.py b/apps/api/plane/authentication/views/app/gitlab.pyindex e22911d32e..b2e5da80f1 100644--- a/apps/api/plane/authentication/views/app/gitlab.py+++ b/apps/api/plane/authentication/views/app/gitlab.py@@ -61,7 +61,6 @@ class GitLabCallbackEndpoint(View):def get(self, request):code = request.GET.get("code")state = request.GET.get("state")- base_host = request.session.get("host")next_path = request.session.get("next_path")if state != request.session.get("state", ""):diff --git a/apps/api/plane/authentication/views/app/google.py b/apps/api/plane/authentication/views/app/google.pyindex aa65fa7fb6..cfa409ae51 100644--- a/apps/api/plane/authentication/views/app/google.py+++ b/apps/api/plane/authentication/views/app/google.py@@ -62,7 +62,6 @@ class GoogleCallbackEndpoint(View):def get(self, request):code = request.GET.get("code")state = request.GET.get("state")- base_host = request.session.get("host")next_path = request.session.get("next_path")if state != request.session.get("state", ""):diff --git a/apps/api/plane/authentication/views/app/magic.py b/apps/api/plane/authentication/views/app/magic.pyindex 9be3693e55..694fca6cb7 100644--- a/apps/api/plane/authentication/views/app/magic.py+++ b/apps/api/plane/authentication/views/app/magic.py@@ -160,8 +160,6 @@ class MagicSignUpEndpoint(View):error_message="USER_ALREADY_EXIST",)params = exc.get_error_dict()- if next_path:- params["next_path"] = str(next_path)url = get_safe_redirect_url(base_url=base_host(request=request, is_app=True),next_path=next_path,diff --git a/apps/api/plane/authentication/views/space/magic.py b/apps/api/plane/authentication/views/space/magic.pyindex 81ef6f77fa..0a5f2b42c9 100644--- a/apps/api/plane/authentication/views/space/magic.py+++ b/apps/api/plane/authentication/views/space/magic.py@@ -1,5 +1,3 @@-from urllib.parse import urljoin, urlencode-# Django importsfrom django.core.validators import validate_emailfrom django.http import HttpResponseRedirect@@ -103,10 +101,11 @@ class MagicSignInSpaceEndpoint(View):except AuthenticationException as e:params = e.get_error_dict()- base_url = get_safe_redirect_url(- base_url=base_host(request=request, is_space=True), next_path=next_path+ url = get_safe_redirect_url(+ base_url=base_host(request=request, is_space=True),+ next_path=next_path,+ params=params,)- url = urljoin(base_url, "?" + urlencode(params))return HttpResponseRedirect(url)