Google+ SignIn Button with PhoneGap

后端 未结 1 1103
陌清茗
陌清茗 2021-01-12 16:09

How can we use the JS Google+ Signin button with Phonegap? Specifically for iOS? I have found this article on doing oauth with phonegap and the childbrowser plugin however

相关标签:
1条回答
  • 2021-01-12 16:46

    The Google+ Sign-In button won't work for you in PhoneGap because of how Phonegap serves content (basically its treated as file://) and that leads to a few problems that relate to either the button itself or to the API Console config.

    What you'll want to do is to use an OAuth plugin for PhoneGap and treat your phonegap app as an "Installed application." I did a quick glance through the following tutorial and it appears to be an accurate set up and process:

    http://www.itsalif.info/content/oauth-google-api-gapi-phonegap-childbrowser-jquery

    You can still request the Google+ Sign-In scope (https://www.googleapis.com/auth/plus.login) with this approach and take advantage of most of the new Google+ features.

    I will be interested to learn if you get this working, so please comment later if you are successful.

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