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

Breaking change to Ionic WebView breaks auth on Cordova 8 + Ionic #1244

Open
andyepx opened this issue Sep 24, 2018 · 5 comments
Open

Breaking change to Ionic WebView breaks auth on Cordova 8 + Ionic #1244

andyepx opened this issue Sep 24, 2018 · 5 comments

Comments

@andyepx
Copy link

andyepx commented Sep 24, 2018

[REQUIRED] Describe your environment

  • Operating System version: Android 7 + Ionic + Cordova 8
  • Browser version: Ionic / Cordova
  • Firebase SDK version: 5.5.2
  • Firebase Product: auth

[REQUIRED] Describe the problem

Steps to reproduce:

It appears that Ionic Webview has changed and it's not possible to use signInWithRedirect on Android as it's now serving content from an integrated http server, at http://localhost:8080 instead of using file:// as previously. This seems to break the login flow.

More info are available at https://github.com/ionic-team/cordova-plugin-ionic-webview

How can I force Firebase Auth to detect my Cordova setup?

Relevant Code:

I have implemented the auth in the simplest way:

    const provider = new firebase.auth.GoogleAuthProvider();
    firebase.auth().signInWithRedirect(provider)
      .then(function (x) {
        console.log(x);
      });

And after a successful login, the OAuth handler redirects to http://localhost:8080 which is an empty page, instead of flowing back to the app.

@ericgopak
Copy link

ericgopak commented Dec 2, 2018

Have you checked if your app allows navigation to URLs with http:// protocol? (perhaps your config.xml only allows for https:// )

Try adding the following entry to your config.xml:

<allow-navigation href="http://*" />

This solution worked for a possibly related issue: https://stackoverflow.com/a/53566771/2779681

@MSchmack
Copy link

MSchmack commented Jan 13, 2019

Partially works for me with

afterwards it tries to open the login with the in-app browser "403" which leads to the issue #507

Related open issue, #507

@esase
Copy link

esase commented Jan 14, 2019

Partially is not enough anyway

@ishaiavrahami
Copy link

Any solution?

@louisameline
Copy link

Starting from April 2020 (this month!), Apple will no longer accept hybrid apps that do not use WKWebView.
As others, I made the switch from the UIWebView.
Only to realize that the regular Cordova WKWebView has bugs that the Ionic webview fixes.
So, now would be a great time to decide if something can be done, because we're about to lose our workaround. Thank you

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

No branches or pull requests

9 participants