Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Policy Issue #10

Open
aldyahsn opened this issue Mar 15, 2017 · 11 comments
Open

Google Policy Issue #10

aldyahsn opened this issue Mar 15, 2017 · 11 comments

Comments

@aldyahsn
Copy link

aldyahsn commented Mar 15, 2017

Can you authenticate google account? I had tried your samples, it was okay long time ago when you released first commit. But unfortunately right now I can't do that again. It seems google has new policy for web view. When I tried to authenticate my firebase using google got this message

403 Error

"This user-agent is not permitted to make OAuth authorisation request to Google as it is classified as an embedded user-agent (also known as a web-view). Per our policy, only browsers are permitted to make authorisation requests to Google. We offer several libraries and samples for native apps to perform authorisation request in browser."

@agentphantom
Copy link
Member

Hi,

Thanks for reporting this.

I just tried the following on my live version of PizzaApp.

  1. I relogged with my Google Apps account (which is the same as Gmail), had no problem.
  2. I deleted my account from the Firebase console and signed up fresh and still no issues.

You can try the following:

In StageWebView/Feathers WebView there's a setting to use the native web view or the built in from AIR. Try setting that to true and false to see if there's any difference.

@aldyahsn
Copy link
Author

aldyahsn commented Mar 16, 2017

Hi,

Have you read this? https://www.theregister.co.uk/2016/08/23/google_to_block_web_views_from_using_its_oauth/

Even though I followed your example in Auth section, the problem still hasn't been solved yet.

problem pic

But when I copied url of webview.location from function changeLocation() to chrome, authentication UI showed off.

I think google only allows access the url only from browser to provide security.

@aldyahsn
Copy link
Author

Anyway I installed your Pizza App. It works well. I don't know when you update it. My guess is maybe google allows access from app which published on early 2017 but it is blocking latest released app due to blocking time next month. I think you should try to deploy new one to test it.

@agentphantom
Copy link
Member

I did read the post from the google dev blog and they mentioned they won't allow generic web views but you can still use native web views (which AIR provides).

Try to debug on your phone on both native and non native web views to see if there's any difference since the user agent is different there.

I also have been using the latest versions of AIR. You can try using the just released version 25.

You can go further and try the apk from the Releases tab in the PIzzaApp repository. That version is not linked to the PlayStore.

@agentphantom
Copy link
Member

I just gave it a try in a new app.

In new apps it doesn't work at all, it only works on old apps and it's very likely to break in the next weeks.

I tried setting a different userAgent, changing to native and non native but nothing worked. The only thing to do is not to use Google login for the meantime.

I researched what have the AIR competitors done (Cordova, Ionic, Xamarin) and they opted to follow Google's guidelines with their equivalent of ANEs.

@benkhachouch
Copy link

But we can use e-mail/password connections ?

@agentphantom
Copy link
Member

agentphantom commented Mar 16, 2017

Yes, Email with Pass and Anonymous auth should work with no problem since they are tied directly with Firebase.

Facebook and Twitter should work fine for the time being.

I was thinking that there may be a simple fix for Google. I will investigate about custom URI schemas in AIR.

@benkhachouch
Copy link

benkhachouch commented Mar 17, 2017 via email

@agentphantom
Copy link
Member

Good news.

I was able to implement one of the new methods Google suggests.

You can check it here:
https://github.com/PhantomAppDevelopment/socialmedia-as3/tree/master/google

If it works for you I can try and port it so it can work with Firebase.

@aldyahsn
Copy link
Author

aldyahsn commented Mar 23, 2017

I tried on mobile device. Still doesn't work. It only works on Desktop when url is opened with browser. However it doesn't happen on mobile browser. Weird.

@agentphantom
Copy link
Member

agentphantom commented Mar 23, 2017

Thanks for reporting back.

In which mobile device do you tested?
I had success with an Android 5.1 on AIR 25.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants