diff --git a/apiserver/plane/authentication/views/space/signout.py b/apiserver/plane/authentication/views/space/signout.py index 58bf54b80..d3f29bd8d 100644 --- a/apiserver/plane/authentication/views/space/signout.py +++ b/apiserver/plane/authentication/views/space/signout.py @@ -12,6 +12,8 @@ from plane.db.models import User class SignOutAuthSpaceEndpoint(View): def post(self, request): + next_path = request.POST.get("next_path") + # Get user try: user = User.objects.get(pk=request.user.id) @@ -20,10 +22,8 @@ class SignOutAuthSpaceEndpoint(View): user.save() # Log the user out logout(request) - return HttpResponseRedirect( - base_host(request=request, is_space=True) - ) + url = f"{base_host(request=request, is_space=True)}{next_path}" + return HttpResponseRedirect(url) except Exception: - return HttpResponseRedirect( - base_host(request=request, is_space=True) - ) + url = f"{base_host(request=request, is_space=True)}{next_path}" + return HttpResponseRedirect(url) diff --git a/space/components/issues/navbar/user-avatar.tsx b/space/components/issues/navbar/user-avatar.tsx index 51051a22a..4e0122198 100644 --- a/space/components/issues/navbar/user-avatar.tsx +++ b/space/components/issues/navbar/user-avatar.tsx @@ -98,6 +98,7 @@ export const UserAvatar: FC = observer(() => { {csrfToken && (