From e713bdab0bbee3768d955c81f22bbf86ab8b934b Mon Sep 17 00:00:00 2001 From: ibuler Date: Wed, 18 Oct 2023 16:09:17 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=81=E4=B8=9A=E5=BE=AE=E4=BF=A1?= =?UTF-8?q?=E7=BB=91=E5=AE=9A=E5=90=8E=E9=80=80=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/authentication/views/dingtalk.py | 2 ++ apps/authentication/views/feishu.py | 2 ++ apps/authentication/views/wecom.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/apps/authentication/views/dingtalk.py b/apps/authentication/views/dingtalk.py index fcff66527..536ef4155 100644 --- a/apps/authentication/views/dingtalk.py +++ b/apps/authentication/views/dingtalk.py @@ -1,6 +1,7 @@ from urllib.parse import urlencode from django.conf import settings +from django.contrib.auth import logout as auth_logout from django.db.utils import IntegrityError from django.http.request import HttpRequest from django.http.response import HttpResponseRedirect @@ -158,6 +159,7 @@ class DingTalkQRBindCallbackView(DingTalkQRMixin, View): ip = get_request_ip(request) OAuthBindMessage(user, ip, _('DingTalk'), user_id).publish_async() msg = _('Binding DingTalk successfully') + auth_logout(request) response = self.get_success_response(redirect_url, msg, msg) return response diff --git a/apps/authentication/views/feishu.py b/apps/authentication/views/feishu.py index 5be872987..4ceacc21b 100644 --- a/apps/authentication/views/feishu.py +++ b/apps/authentication/views/feishu.py @@ -1,6 +1,7 @@ from urllib.parse import urlencode from django.conf import settings +from django.contrib.auth import logout as auth_logout from django.db.utils import IntegrityError from django.http.request import HttpRequest from django.http.response import HttpResponseRedirect @@ -121,6 +122,7 @@ class FeiShuQRBindCallbackView(FeiShuQRMixin, View): ip = get_request_ip(request) OAuthBindMessage(user, ip, _('FeiShu'), user_id).publish_async() msg = _('Binding FeiShu successfully') + auth_logout(request) response = self.get_success_response(redirect_url, msg, msg) return response diff --git a/apps/authentication/views/wecom.py b/apps/authentication/views/wecom.py index 7bc814d3f..6817c84a0 100644 --- a/apps/authentication/views/wecom.py +++ b/apps/authentication/views/wecom.py @@ -1,6 +1,7 @@ from urllib.parse import urlencode from django.conf import settings +from django.contrib.auth import logout as auth_logout from django.db.utils import IntegrityError from django.http.request import HttpRequest from django.http.response import HttpResponseRedirect @@ -158,6 +159,7 @@ class WeComQRBindCallbackView(WeComQRMixin, View): ip = get_request_ip(request) OAuthBindMessage(user, ip, _('WeCom'), wecom_userid).publish_async() msg = _('Binding WeCom successfully') + auth_logout(request) response = self.get_success_response(redirect_url, msg, msg) return response