GoogleWebComponents / google-signin

Google Sign-in web component
https://elements.polymer-project.org/elements/google-signin
Other
279 stars 100 forks source link

Not working in Android "web app" #60

Open nomego opened 9 years ago

nomego commented 9 years ago

When using the google-signin component / button for a mobile web app (Add to homescreen, start without browser controls, "web app" mode) the G+ sign-in doesn't work. Pressing the button opens a new window in Chrome where the user can approve the G+ sign-in but after the authorization is complete, the user it not returned to the web app.

Is there any way to solve this ?

nomego commented 9 years ago

Also, this is present in iOS except the behavior is that the new login window opens within the web app and when authorization is complete, the text "Please close this window" is all that is left and you'll have to force quit the web app.

addyosmani commented 9 years ago

Do you have a reduced test-case we can look at to verify this behaviour is present?

nomego commented 9 years ago

Well, not a reduced, isolated test case, but you can use our pilot app http://cz3d.neovici.se

davidmaxwaterman commented 9 years ago

Is it viable to make a test app for things that require oauth and/or secrets/etc? I'm still finding it quite confusing, tbh, not least because client app (eg chrome app/extensions) are all plain text. IINM, it just needs various amounts of digging and the codes can be seen and copied (is that true of codes in the manifest too?). Off topic, I suppose, but I'd really appreciate any links that can help me understand this aspect.

Zoramite commented 9 years ago

I think the original problem with this bug was an issue with iOS: http://stackoverflow.com/questions/25804730/window-close-doesnt-work-on-ios-8-gm-seed

My understanding is that the latest version (or upcoming release?) should fix the bug with the window.close not actually working correctly.

nomego commented 9 years ago

Well I don't have an iOS device right now, but it doesn't work with Android either.

Zoramite commented 9 years ago

Can you add more details about what you are seeing currently? Does the window just not close? If you manually close the window does it go back to the app and work normally? Does the immediate auth still work when you reload?

nomego commented 9 years ago

Well a new window opens in the browser, I get to the account chooser, choose an account and get to a blank page.

Backing out of it and back to the app I'm not logged in, not after refreshing either.

The pilot app referenced in the issue is still available if you want to try it yourself.

fernandezpaco commented 7 years ago

Same problem here, when you pack the signin component in a cordova app, the auth process happens in the same window and at the end the script tries to close the current window and fails.

Basically the problem is described here: http://phonegap-tips.com/articles/google-api-oauth-with-phonegaps-inappbrowser.html

The component supports signin for web apps but when packed as app it is not working because it should use a different mechanism (OAuth 2.0 for installed applications).

It would be awesome if the component supports both behaviors.

Thanks

StephanBeutel commented 7 years ago

Any news on this problem? I'm also fighting with this problem.

Would be great to get the component working in a cordova app.

ManoBalaR commented 6 years ago

Same Problem Here..

When using the google-signin component / button for a mobile web app (Add to homescreen, start without browser controls, "web app" mode) the G+ sign-in doesn't work. Pressing the button opens a new window in Chrome where the user can approve the G+ sign-in but after the authorization is complete, the user it not returned to the web app.

Is there any way to solve this ?

vamsi-manyam commented 3 years ago

Same Problem Here..

When using the google-signin component / button for a mobile web app (Add to homescreen, start without browser controls, "web app" mode) the G+ sign-in doesn't work. Pressing the button opens a new window in Chrome where the user can approve the G+ sign-in but after the authorization is complete, the user it not returned to the web app.

Is there any way to solve this ?

Hey did someone found the solution for this?

ajaykmankani commented 2 years ago

me too on the same page my google sign in working on a computer browser but not on an android chrome browser. anybody have any solutions?

hieugia3030 commented 1 year ago

I am also facing this issue, has the problem been fixed yet?