-
Notifications
You must be signed in to change notification settings - Fork 12
Google Sign-in iOS #5
Comments
Hi @agrieve, I'm happy to get this started as we need it to resubmit, any chance you could set up the framework repo and then npm module etc? that way MobileChromeApps maintains control. Then I can PR. Something like:
|
Hi! Certainly would be a good idea to update to use the newer google sign-in library. It'll be tougher than doing what was done for the googleplus framework though, as this library requires cocoapods (and has a few dependencies). Support for cocoapods within cordova has started, although I think might be somewhat stalled due to lack of a committer to champion it: |
Hi @agrieve, As the library was available without coco-pods (https://developers.google.com/identity/sign-in/ios/sdk/) creating the framework plugin was a simple process: https://github.com/gbenvenuti/cordova-plugin-google-sign-in-ios Happy to transfer ownership to MobileChromeApps if you like. I also have not yet published to NPM. As for the identity plugin I'll submit a PR once it's complete. |
Oh, nice! SGTM then! Only thing I'd need from you is for you to sign the Google contributor agreement (can be done online): https://github.com/MobileChromeApps/mobile-chrome-apps/blob/master/CONTRIBUTING.md#legal Once you do (or confirm that you already did, I can just fork your framework repo and publish it. |
Hey, I've already signed, did it for the signout feature on this plugin. |
Thanks for being awesome :) |
Hi @agrieve, Excellent. One question on the removeCachedAuthToken implementation in iOS. The current version nils the auth token. This is not possible with the sign-in plugin as these are read-only properties. I'm not sure what exactly the use case is here. The token is revoked on the JS side so the account is effectively disconnected. Is there are method from https://developers.google.com/identity/sign-in/ios/api/interface_g_i_d_sign_in that you would recommend? |
The use case here is that you've requested an auth token, tried to use it, and then discover that it has expired. In this case, you need to tell the library that "hey, it didn't work! Give me a new one". Looks like the equivalent in the new lib is |
Any chance you could point me to where you found reference to |
bah, apparently the lack of this function is a known issue and the replacement I suggested is from a work-in-progress fix. For now, I'd suggest just replacing it with a TODO. |
Hi @agrieve , Ok, here's where I'm at: master...gbenvenuti:iosGoogleSignIn I haven't created a pull request yet, as there's a few things still to sort out.
<plugin name="cordova-plugin-chrome-apps-identity" spec="^X.X.X">
<variable name="IOS_BUNDLE_ID" value="value" />
<variable name="IOS_CLIENT_ID" value="value" />
<variable name="IOS_REVERSED_CLIENT_ID" value="value" />
</plugin> The install command becomes
When working with plugins I prefer not to have to copy other files etc over just to make the plugin functional. The ideal workflow is to have everything defined in Having said that, if you'd rather a more manual approach I'll work around that.
I have enough now to resubmit our app to the store, I'm happy to finish it off after your feedback, or for you to take it from there. Thanks for your help. |
Had a look at your diff. Looks great! The |
I've submitted a PR for the SDK 2.1.0 So now in the |
Great! I've published 2.1.0 to npm. Yeah, the new API isn't exactly the same in semantics, but it's close enough. The expected usage is:
I can't see a reason to clear the cached auth token and not request a new one right afterwards. It could be a bit weird that clearAuthToken will timeout when not online (since it's actually refreshing under-the-hood). Perhaps instead of calling it right away, we set a flag in the class that tells it to call |
Hi,
Is there plans to integrate the Google Sigin-in for iOS into this plugin?
https://developers.google.com/identity/sign-in/ios/
Apple has rejected one of our apps for jumping to safari to complete oauth.
The text was updated successfully, but these errors were encountered: