fix: 增加上了第三方用户登录失败的原因 (#8714)

* feat: OAuth2.0登录方式加上用户登录规则校验

* fix: 修复第三方用户登录规则(复核)问题

* fix: 增加上了第三方用户登录失败的原因

* fix: 修改变量名称

Co-authored-by: huangzhiwen <zhiwen.huang@fit2cloud.com>
This commit is contained in:
fit2bot
2022-08-10 11:03:51 +08:00
committed by GitHub
parent 708a87c903
commit 30fe5214c7
3 changed files with 11 additions and 2 deletions

View File

@@ -17,8 +17,10 @@ class TicketStatusApi(mixins.AuthMixin, APIView):
def get(self, request, *args, **kwargs):
try:
self.check_user_login_confirm()
self.request.session['auth_third_party_done'] = 1
return Response({"msg": "ok"})
except errors.NeedMoreInfoError as e:
self.send_auth_signal(success=False, reason=e.as_data().get('msg'))
return Response(e.as_data(), status=200)
def delete(self, request, *args, **kwargs):