requests / requests-oauthlib

OAuthlib support for Python-Requests!
https://requests-oauthlib.readthedocs.org/
ISC License
1.71k stars 421 forks source link

Update google.rst #454

Closed likesclever closed 2 years ago

likesclever commented 2 years ago

https://developers.google.com/identity/protocols/oauth2/openid-connect?hl=en#scope-param https://developers.google.com/identity/protocols/oauth2/scopes#oauth2

likesclever commented 2 years ago

Do i need to do anything else

Is there a way to verify these changes work? Screen shot, demo, or something else maybe?

likesclever commented 2 years ago

Do i need to do anything else

Is there a way to verify these changes work? Screen shot, demo, or something else maybe?

Without "openid", the "email" attribute is not returned: {'id': '102430716320508450299', 'name': '王健辉', 'given_name': '健辉', 'family_name': '王', 'picture': 'https://lh3.googleusercontent.com/a-/AOh14GgIPx4ZiXyy-rEPCQu9ARptOQmXar2qwh1RIcqy=s96-c', 'locale': 'zh-CN'} After adding "openid", the "email" attribute will be returned: {'id': '102430716320508450299', 'email': 'mr.wangjianhui@gmail.com', 'verified_email': True, 'name': '王健辉', 'given_name': '健辉', 'family_name': '王', 'picture': 'https://lh3.googleusercontent.com/a-/AOh14GgIPx4ZiXyy-rEPCQu9ARptOQmXar2qwh1RIcqy=s96-c', 'locale': 'zh-CN'}

jtroussard commented 2 years ago

Do i need to do anything else

Is there a way to verify these changes work? Screen shot, demo, or something else maybe?

Without "openid", the "email" attribute is not returned: {'id': '102430716320508450299', 'name': '王健辉', 'given_name': '健辉', 'family_name': '王', 'picture': 'https://lh3.googleusercontent.com/a-/AOh14GgIPx4ZiXyy-rEPCQu9ARptOQmXar2qwh1RIcqy=s96-c', 'locale': 'zh-CN'} After adding "openid", the "email" attribute will be returned: {'id': '102430716320508450299', 'email': 'mr.wangjianhui@gmail.com', 'verified_email': True, 'name': '王健辉', 'given_name': '健辉', 'family_name': '王', 'picture': 'https://lh3.googleusercontent.com/a-/AOh14GgIPx4ZiXyy-rEPCQu9ARptOQmXar2qwh1RIcqy=s96-c', 'locale': 'zh-CN'}

was the example broken before?

jtroussard commented 2 years ago

Was able to verify this updates results in successfully implementation of the library, making small non-functional change to trigger new pipeline checks.

Please go here and authorize: https://accounts.google.com/o/oauth2/v2/auth?response_type=code&client_id=304001012802-0ees1230msjhq4mg42bbup0qsqv392nd.apps.googleusercontent.com&redirect_uri=https%3A%2F%2Fdeveloperslifefor.me&scope=openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&state=inBDO80eGx3xRKsioqW5gKwUcJomhi&access_type=offline&prompt=select_account Paste the full redirect URL here: https://developerslifefor.me/?state=inBDO80eGx3xRKsioqW5gKwUcJomhi&code=4%2F0AX4XfWgtLtppeb5C_WTRvOh1AJPfIdh9nG-IRcyWPZ51ZVBSpq_ndSPZikqvRCqXh_LoIQ&scope=email+profile+openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile&authuser=0&prompt=consent# b'{\n "id": "106402832064790875123",\n "email": ,\n "verified_email": true,\n "name": "Jacques Troussard",\n "given_name": "Jacques",\n "family_name": "Troussard",\n "picture": "https://lh3.googleusercontent.com/a-/AOh14Gg4tG2gqM2Gd9uGj4ab9Kg_MoQ4bIsKk--G1ZgXIE4=s96-c",\n "locale": "en"\n}\n'

coveralls commented 2 years ago

Coverage Status

Coverage increased (+0.08%) to 90.239% when pulling e92087fdd97948e024672c71257c3d5dfd183198 on mrwangjianhui:Update-google.rst into 46f886ccb74652fc9c850ece960edcf2bce765a5 on requests:master.