PhantomAppDevelopment / socialmedia-as3

Authenticate users from social media networks into your Adobe AIR projects. Including Facebook, Twitter and Google+
MIT License
14 stars 2 forks source link

Google connect issue #3

Open alamboley opened 7 years ago

alamboley commented 7 years ago

Hello,

I've a redirect_uri using an https. How I'm supposed to change serverSocket.bind(9005, "::");?

At the moment I can log with my account but I got no trace. Also I saw it opens in the browser, Apple won't refuse my app !?

Thanks for your great contributions to the AS3 community :)

agentphantom commented 7 years ago

Hi,

I'm not sure if Apple will reject the app since I haven't deployed an iOS app with this particular Sign-In method. But according to Google it should be fine, here's a link with more details:

https://developers.googleblog.com/2016/08/modernizing-oauth-interactions-in-native-apps.html

As a side note I also studied their official SDK for other programming language (Python) and behaves just the same by opening the default web browser and instantiating a Server Socket.

I'm aware that this method works fine on Windows, macOS and Android where a normal Socket is enough.

I tried to make it work with a SecureSocket but had no success. Maybe on iOS it needs a different configuration.

With this method you don't need to specify a regular redirect URI. By specifying something like this: http://[::1]:9005 the OAuth backend knows that you want to use the loopback method. Here's a link with more details:

https://developers.google.com/identity/protocols/OAuth2InstalledApp#redirect-uri_loopback