[Update] 修改OpenID用户获取username的问题

pull/3882/head
Bai 2020-04-13 18:21:49 +08:00
parent 52c6244b2b
commit 41cbd3e0f6
1 changed files with 1 additions and 1 deletions

View File

@ -157,7 +157,7 @@ class Client(object):
userinfo = self.get_userinfo(token=token_response['access_token']) userinfo = self.get_userinfo(token=token_response['access_token'])
with transaction.atomic(): with transaction.atomic():
name = userinfo.get('name', '') name = userinfo.get('name', '')
username = userinfo.get('preferred_username', ''), username = userinfo.get('preferred_username', '')
email = userinfo.get('email', '') email = userinfo.get('email', '')
email = construct_user_email(username, email) email = construct_user_email(username, email)