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

Lock is having issues when using Popup in Android with Chrome #99

Closed
mgonto opened this issue Dec 30, 2014 · 2 comments
Closed

Lock is having issues when using Popup in Android with Chrome #99

mgonto opened this issue Dec 30, 2014 · 2 comments
Labels
bug This points to a verified bug in the code

Comments

@mgonto
Copy link

mgonto commented Dec 30, 2014

Let's say that person also wants to publish that app as a Website that uses Popup mode from Lock. If you try that website on Chrome for Android you'd get an error. That's because when Chrome tries to open the authentication URL in the popup, Chrome will see there're more than one app registered for that URL (Facebook's authenticate URL for example) and will open the IntentChooser form. Once that happens, the popup is closed and whatever he chooses (Facebook or Chrome for example), it won't work.

You can see a video of this error.

The solution for now is to use redirect if the app is running on Android and it's not a Cordova hosted app. Otherwise, it'll use the Popup (which was intended)

Pseudo code:

if (!window.cordova && UA chrome android) { 
   lock.signin(options);

} else {
   lock.signin(options, done);
}

if (window.location.hash) {
  lock.parseHash....
  done()..
}

function done() {
  // handle user logged in
}

We should look into ways of forcing this popup NOT to open the IntentChooser and remain in the browser on Chrome on Android.

@mgonto mgonto added the bug This points to a verified bug in the code label Dec 30, 2014
@mgonto mgonto changed the title Lock is having issues when using Popup (or cordova mode) in Android with Chrome Lock is having issues when using Popup in Android with Chrome Dec 30, 2014
@mgonto
Copy link
Author

mgonto commented Dec 30, 2014

It's related to mozilla/winchan#6

@brentvatne
Copy link

👍

@hzalaz hzalaz closed this as completed Aug 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

3 participants