You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you all for coming up with this wonderful app. It's really cool! However, please allow me to post a question here, since I don't know a better place to shoot this question.
I am using django-social-auth with my authentication mechanism of my application. In other parts of my app, I need the email from the logged-in user for certain features. I do not have any problem with Google and Yahoo. However, when it comes to facebook, I could not gain the user email from reques.user. Could you please tell me where I will be able to get the user email?
Here comes my code to get the user info. Thank you very much.
'''
Gets the basic user information from the system.
'''
def getDjangoDefaultUserInfo(request):
email = ''
provider = None
user_name = request.user.username
provider_string = ''
if user_name != '':
email = request.user.email
provider = request.user.social_auth.values_list('provider', flat=True)
for name in provider:
provider_string += name.lower().replace('-', '_')
info = {
'user_name' : user_name,
'email' : email,
'provider' : provider_string
}
return info
The text was updated successfully, but these errors were encountered:
Thank you all for coming up with this wonderful app. It's really cool! However, please allow me to post a question here, since I don't know a better place to shoot this question.
I am using django-social-auth with my authentication mechanism of my application. In other parts of my app, I need the email from the logged-in user for certain features. I do not have any problem with Google and Yahoo. However, when it comes to facebook, I could not gain the user email from reques.user. Could you please tell me where I will be able to get the user email?
Here comes my code to get the user info. Thank you very much.
The text was updated successfully, but these errors were encountered: