I am using Flask dance in order to authenticate users (using Google as auth provider) I try to get the user email and tried few options - non of them returned the email.
Code snippet:(google is flak-dance Google blue print)
if not google.authorized:
return redirect(url_for("google.login"))
else:
resp = google.get(url)
I have tried the following urls:
I was using the scope: scope=["profile", "email"]
when the Google blueprint was created. The data structure that I get as result is:
{'sub': 'XYZ', 'name': 'XYZ', 'given_name': 'XYZ',
'family_name': 'XYZ', 'picture': 'XYZ', 'locale': 'XYZ'}
On page https://console.cloud.google.com/apis/credentials/consent, Under the 'OAuth consent screen' page, under the section 'Scopes for Google APIs' I have the following entries:
- profile
- openid
My question is:
How do I get the the fields above and the user's email?
Thanks