Require Google to return email address as part of OAuth

后端 未结 7 698
情歌与酒
情歌与酒 2020-12-23 10:23

I am using OAuth to access Gmail with dotNetOAuth. How can I force Google to return user\'s email address as part of callback after authorization?

By default, Google

相关标签:
7条回答
  • 2020-12-23 10:51

    In php, apiOauth2Service.php class provides methods to access logged in user info. For this you can use userinfo->get() method. Make sure you also use scope https://www.googleapis.com/auth/userinfo.email.

    This will work with same access token. Also you should try looking in other APIs for similar kind of information in return. This is much easier to look through oAuth_playground >> http://code.google.com/apis/explorer/

    0 讨论(0)
提交回复
热议问题