From c5b8ae6c9a338b7f2561878cfbe222c864c8a62a Mon Sep 17 00:00:00 2001 From: jiangweidong Date: Thu, 9 Feb 2023 11:22:58 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BF=AE=E6=94=B9=E5=8F=98=E9=87=8F?= =?UTF-8?q?=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/authentication/backends/oauth2/views.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/authentication/backends/oauth2/views.py b/apps/authentication/backends/oauth2/views.py index ad95e29cd..e3b919fff 100644 --- a/apps/authentication/backends/oauth2/views.py +++ b/apps/authentication/backends/oauth2/views.py @@ -86,10 +86,10 @@ class OAuth2EndSessionView(View): logger.debug(log_prompt.format('Log out the current user: {}'.format(request.user))) auth.logout(request) - next_url = settings.AUTH_OAUTH2_PROVIDER_END_SESSION_ENDPOINT - if settings.AUTH_OAUTH2_LOGOUT_COMPLETELY and next_url: + logout_url = settings.AUTH_OAUTH2_PROVIDER_END_SESSION_ENDPOINT + if settings.AUTH_OAUTH2_LOGOUT_COMPLETELY and logout_url: logger.debug(log_prompt.format('Log out OAUTH2 platform user session synchronously')) - return HttpResponseRedirect(next_url) + return HttpResponseRedirect(logout_url) logger.debug(log_prompt.format('Redirect')) return HttpResponseRedirect(logout_url)