Skip to content

Commit

Permalink
chore(odnoklassniki): add 'email' field
Browse files Browse the repository at this point in the history
  • Loading branch information
pennersr committed Dec 14, 2021
1 parent 3bb0482 commit e1134a5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
6 changes: 5 additions & 1 deletion allauth/socialaccount/providers/odnoklassniki/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ def extract_uid(self, data):
return data["uid"]

def extract_common_fields(self, data):
return dict(last_name=data.get("last_name"), first_name=data.get("first_name"))
return dict(
last_name=data.get("last_name"),
first_name=data.get("first_name"),
email=data.get("email"),
)


provider_classes = [OdnoklassnikiProvider]
25 changes: 13 additions & 12 deletions allauth/socialaccount/providers/odnoklassniki/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,27 @@


USER_FIELDS = [
"uid",
"locale",
"first_name",
"last_name",
"name",
"gender",
"age",
"birthday",
"has_email",
"current_status",
"current_status_id",
"current_status_date",
"current_status_id",
"email",
"first_name",
"gender",
"has_email",
"last_name",
"locale",
"location",
"name",
"online",
"photo_id",
"pic_1", # aka pic50x50
"pic_2", # aka pic128max
"pic1024x768", # big
"pic190x190", # small
"pic640x480", # medium
"pic1024x768", # big
"location",
"pic_1", # aka pic50x50
"pic_2", # aka pic128max
"uid",
]


Expand Down

0 comments on commit e1134a5

Please sign in to comment.