Reputation: 4038
I'm new to OAuth and the django-allauth
plugin, and so far it has been really hard to find proper documentation on the mentioned plugin. I have found many disperse help in some questions here, and have read some code from the repo but there are some things that I just have not found yet. Right now, im trying to populate my user object based on the extra_info
contained in the SocialAccount
object associated to the user. My problem is that I have not found extensive documentation for the setting SOCIALACCOUNT_PROVIDERS. So far, I have gathered some useful info (mostly from here) and have the following setting:
SOCIALACCOUNT_PROVIDERS = {
'facebook': {
'SCOPE': [
'email',
'read_friendlists',
'user_birthday',
'user_about_me',
'user_interests',
'user_groups'
],
#'AUTH_PARAMS': { 'auth_type': 'reauthenticate' },
'AUTH_PARAMS': { },
'METHOD': 'oauth2'
},
}
It gets most of the desired information from facebook, but from twitter, since there is not scope defined, it only gets the name of the user, but fails in getting the email, and some other stuff I would like to know.
Where can I find extensive documentation in defining this setting for all the providers, and, specifically, which are valid strings to place in the SCOPE
list for twitter? How can I make twitter give me the same info (or close) that what I get from facebook with the previous setting?
Thanks for your help!
Upvotes: 1
Views: 4458
Reputation: 6521
The scope related parameters are really provider dependent. You will have to look up the parameters and what is possible up in the documentation of the particular provider (for FB, check here for info on scope: https://developers.facebook.com/docs/reference/dialogs/oauth/).
As for e-mail on Twitter: they simply do not hand over this information. So, your app will have to cope with that.
See:
https://dev.twitter.com/discussions/4019
Upvotes: 2