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

package doesn't work proprerly on iOS (and Android?) because Cordova InAppBrowser doesn't support window.close() #8

Closed
jeffreywescott opened this issue Jan 31, 2016 · 10 comments

Comments

@jeffreywescott
Copy link

After completing the SAML authentication process successfully, the in-app browser stays open to a page that just says "Verified".

FYI, this seems to have to do with two things:

  1. saml_server.js uses window.close() to complete the sign-in process.
  2. Cordova InAppBrowser doesn't truly support window.close().

A possible workaround would be something like this.

See also: RocketChat/Rocket.Chat#2028

@nate-strauser
Copy link
Owner

this package was modeled after the default meteor oauth behavior, which at
the time did not support single window oauth. meteor does support this
now, so we could use the same mechanism as them.

i agree this is an issue and should be implemented. however i will not be
able to work on this for the foreseeable future. a PR would be welcomed if
someone else has the initiative.

On Sun, Jan 31, 2016 at 4:51 AM, Jeffrey Wescott [email protected]
wrote:

After completing the SAML authentication process successfully, the in-app
browser stays open to a page that just says "Verified".

FYI, this seems to have to do with two things:

  1. saml_server.js uses window.close() to complete the sign-in process.
  2. Cordova InAppBrowser doesn't truly support window.close()
    https://stackoverflow.com/questions/21085041/how-to-close-inappbrowser-itself-in-phonegap-application
    .

A possible workaround would be something like this
https://stackoverflow.com/questions/15666258/phonegap-build-open-external-page-in-inappbrowser-or-childbrowser-with-no-tool/15701122#15701122
.

See also: RocketChat/Rocket.Chat#2028
RocketChat/Rocket.Chat#2028


Reply to this email directly or view it on GitHub
#8.

@moritzmann1
Copy link

@nate-strauser Thank you for your acknowledgment. I think a lot of business users depend on this feature. What is a PR?

Is there a way to put a bounty on this defect/feature?

@nate-strauser
Copy link
Owner

PR -> pull request with the fix :)

On Fri, Feb 5, 2016 at 9:46 AM, moritzmann1 [email protected]
wrote:

@nate-strauser https://github.com/nate-strauser Thank you for your
acknowledgment. I think a lot of business users depend on this feature.
What is a PR?

Is there a way to put a bounty on this defect/feature?


Reply to this email directly or view it on GitHub
#8 (comment)
.

@moritzmann1
Copy link

Nice :) Thanks you for eduction. We'll test the linked phonegap fix next week as hinted by @jeffreywescott.

@nate-strauser
Copy link
Owner

could also do something like what the core oauth package does now - set a
'loginStyle' or popup or redirect
https://github.com/meteor/meteor/blob/devel/packages/oauth/oauth_client.js#L15

handle redirect end -
https://github.com/meteor/meteor/blob/devel/packages/oauth/end_of_redirect_response.js
handle popup end -
https://github.com/meteor/meteor/blob/devel/packages/oauth/end_of_popup_response.js

there is some cordova specific popup handling here also -
https://github.com/meteor/meteor/blob/devel/packages/oauth/oauth_cordova.js


i'm pretty sure the core oauth package has what is needed, just have to
pull in the right bits

On Fri, Feb 5, 2016 at 10:00 AM, moritzmann1 [email protected]
wrote:

Nice :) Thanks you for eduction. We'll test the linked phonegap fix next
week as hinted by @jeffreywescott https://github.com/jeffreywescott.


Reply to this email directly or view it on GitHub
#8 (comment)
.

@rore
Copy link

rore commented Apr 13, 2016

Any chance for a fix for this issue? It really hurts the ability for using the mobile app of rocket.chat in a secure way in a work environment.

@nate-strauser
Copy link
Owner

i've added the ability to post a bounty -
https://www.bountysource.com/issues/30379337-package-doesn-t-work-proprerly-on-ios-and-android-because-cordova-inappbrowser-doesn-t-support-window-close?utm_campaign=plugin&utm_content=tracker%2F530713&utm_medium=issues&utm_source=github

without some other motivation (bounty or a project i'm working on using
this again) it may be quite a while before i have time to fix this

On Wed, Apr 13, 2016 at 1:49 PM, Rotem Hermon [email protected]
wrote:

Any chance for a fix for this issue? It really hurts the ability for using
the mobile app of rocket.chat in a secure way in a work environment.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#8 (comment)

@Steibock
Copy link

How high should a proper incentive/bounty be, so you could solve this soon?

@nate-strauser
Copy link
Owner

not really sure - i was thinking that it would be more driven by how much
those who want the issue resolved need/want it to be fixed

On Thu, Apr 14, 2016 at 11:51 AM, Dumeni Degunda [email protected]
wrote:

What would a proper incentive/bounty be, so you could solve this soon?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#8 (comment)

@nate-strauser
Copy link
Owner

PR submitted and merged - #10

please try version 0.1.3 which should work on cordova

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

5 participants