fix: 修改OAuth2协议的注销地址为非必填项目

This commit is contained in:
jiangweidong
2023-02-09 11:20:54 +08:00
committed by Jiangjie.Bai
parent 3c891ec313
commit 7926f7d75e
2 changed files with 3 additions and 3 deletions

View File

@@ -86,9 +86,9 @@ class OAuth2EndSessionView(View):
logger.debug(log_prompt.format('Log out the current user: {}'.format(request.user)))
auth.logout(request)
if settings.AUTH_OAUTH2_LOGOUT_COMPLETELY:
next_url = settings.AUTH_OAUTH2_PROVIDER_END_SESSION_ENDPOINT
if settings.AUTH_OAUTH2_LOGOUT_COMPLETELY and next_url:
logger.debug(log_prompt.format('Log out OAUTH2 platform user session synchronously'))
next_url = settings.AUTH_OAUTH2_PROVIDER_END_SESSION_ENDPOINT
return HttpResponseRedirect(next_url)
logger.debug(log_prompt.format('Redirect'))