|
@@ -3371,7 +3371,10 @@ class AppleAuthLogin(View):
|
|
|
else:
|
|
|
# 如果用户为绑定过则创建用户并进行登录返回token
|
|
|
userID = CommonService.getUserID(getUser=False)
|
|
|
- nickname = claims['email']
|
|
|
+ if claims.__contains__('email'):
|
|
|
+ nickname = claims['email']
|
|
|
+ else:
|
|
|
+ nickname = 'apple_{num}'.format(num=CommonService.RandomStr(6, False))
|
|
|
return self.do_register(userID, nickname, response, app_bundle_id, unionID)
|
|
|
|
|
|
except Exception as e:
|