sadafk831 / gwt-oauth2

Automatically exported from code.google.com/p/gwt-oauth2
Apache License 2.0
0 stars 0 forks source link

in iOS webview, after authentication oauthWindow.html is displayed instead of callback #47

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Build a simple iOS app with just a WebView. And load the 
http://gwt-oauth2.googlecode.com/svn/trunk/samples/script/ScriptSample.html 
page in webview
2. Click Authenticate With Google button and enter your credentials. Allow the 
app to use your information

What is the expected output? What do you see instead?
In a regular browser or even using Safari on iPhone, the alert shows the auth 
token. But the iOS app with web view loads a blank page (essentially the 
oauthWindow.html page)

What version of the product are you using? On what operating system?
I am using the sample auth app at 
http://gwt-oauth2.googlecode.com/svn/trunk/samples/script/ScriptSample.html

XCode 4.2, iPhone 5.0 simulator

Please provide any additional information below.
I must say this is a great utility. Excellent job. I can still do what I need 
from oauthWindow.html, but I would like to be in the callback so I can use the 
GWT state conveniently

I have attached the iOS app (XCode 4.2 project)

Please let me know if I am missing anything.

Original issue reported on code.google.com by cm.sub...@gmail.com on 22 Jun 2012 at 8:52

Attachments:

GoogleCodeExporter commented 9 years ago
I also tried the same Webview approach in Android (enabled Javascript for 
webview and also enabled "Javascript can open windows"). The result is same as 
iOS - the oauthWindow.html loads instead of callback.

Original comment by cm.sub...@gmail.com on 23 Jun 2012 at 3:07

GoogleCodeExporter commented 9 years ago
On iPad.
My Liferay Portal integration allows GWT MVP Places to be deployed using the 
portlet API.
One of the deployed Places allows visitors to sign in to the portal via their 
gmail account.
In Safari, the oauthWindow.html is never seen by the user, but with Chrome it 
leaves the user with a blank tab and the page they were on in another.
The only workaround I can think of right now is to add something like this to 
the body of the .html:

  <body>
    <h4>(Chrome bug! - with Safari you never see this window)</h4>
    <h1>
        <a href="#" onclick="window.close();return false;">
            Click here to close this window 
        </a>
      </h1>
  </body>

At least then the visitor gets led back to the place they expected to be...

Original comment by biancash...@gmail.com on 28 Aug 2013 at 10:39

GoogleCodeExporter commented 9 years ago
I think this bug needs to be fixed !

I mean we can not complete oAuth in GWT built apps on lots of devices .. :( 
it's a pitty

Is there any alternative ?

Original comment by antw...@gmail.com on 6 Mar 2014 at 8:45