Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAlx Ki
Python Web Development Techdegree Graduate 14,822 PointsDjango-allauth doesn't get my username like in the video.
Hi Kenneth Love !
Watching the video I mentioned that django-allauth automatically got your name from GitHub. In my case it just creates user
with no name or avatar etc.
Tried version from video and latest version.
Reading the docs I found information about scopes, which makes django-allauth be able to access different information:
SOCIALACCOUNT_PROVIDERS = {
'github': {
'SCOPE': [
'user',
],
}
}
It now has access to the info, but doesn't add that info to User's record.
UPDATE:
Well, it gets username only if you have a public email in your GitHub account.. that's strange..
What if I want django-allauth to get the username anyway? And what about avatar?
1 Answer
Kenneth Love
Treehouse Guest Teachera) sorry for the late response, the email got lost somewhere in my inbox.
b) that's weird. I would assume it would get the username no matter what but maybe this is GitHub's way of protecting your data that you haven't explicitly shared. What data do you get without the public email address? Like, what username does your newly created user have?
Alx Ki
Python Web Development Techdegree Graduate 14,822 PointsAlx Ki
Python Web Development Techdegree Graduate 14,822 PointsIt just Creates user with username "user". Weird, but true) With public email it gets GitHub username and email.
Kenneth Love
Treehouse Guest TeacherKenneth Love
Treehouse Guest TeacherWeird. You might leave a bug report on django-allauth but that's likely out of their control.