-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Cordova - Google and Facebook sign in do not redirect back to app in IOS #365
Comments
This is related to the new version of Ionic which in iOS uses WKWebview with localhost. It is a known issue. You have to downgrade to an older version for now until this is fixed. |
Are there any timeline on this issue? |
Add this to your config: It worked for me |
If I add this to my config, when I try to sign in I get the message “This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.” |
Seems like you are on localhost and after modification to your config,
things worked in your favour. if so try http://localhost
On 10-Apr-2018 6:39 PM, "rb010" <[email protected]> wrote:
If I add this to my config, when I try to sign in I get the message “This
operation is not supported in the environment this application is running
on. "location.protocol" must be http, https or chrome-extension and web
storage must be enabled.”
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#365 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ANKmvvMKMwJOIi5wKxKRk2yskjrBpaChks5tnK79gaJpZM4TLtfA>
.
|
Hi @bojeil-google! Since this issue is still open, is it fair to assume that for the auth UI to work we'd still need to downgrade to And if so, do you know if this is this something that can/will be addressed by the Firebase team? Any timeline maybe? I'm just asking because then we may adjust our plans and postpone the implementation of additional auth options for now. The |
The Firebase Auth team would still like to fix this issue. The problem is that it is a sensitive change to fix as it could have unintended consequences. The problem is not the webviewengine but the fact that a local server is spun in the process. If I understand this correctly, the page is getting served as http://localhost instead of the typical file:// environment. |
Thanks for the prompt response. OK, that sounds a bit more complex. Is my understanding correct though that this means deeplinking into an Ionic app (with WKWebView) is generally an issue then, irrespective of Firebase Auth? Because if so, I might try to bring this up with the Ionic team instead. Deeplinking is getting very important for invites/user acquisitions etc. and if that didn't work, it'd be a serious shortcoming of Ionic... |
I don't think the deep linking is the problem. For Firebase Auth, it gets tricky (http://localhost) to tell apart what environment this is running, a typical browser environment or a mobile cordova/ionic environment without adding some expensive delays. I believe the deep linking should still be detectable. Though, I think having a native way for handling deep linking in Cordova would be a huge asset to all Cordova/Ionic developers. I am not sure if this is something they would provide as a built-in API. |
Thanks for getting back. We've postponed email+password login for now but would definitely use FirebaseUI in the future if there's a way to work with Thanks again for being so responsive! |
@bojeil-google can you provide a link to the known issue? I've been trying to find the right issue to follow |
I had the same issue, and changing the webview engine didn't solve it for me. What worked for me was to add I guess this worked for me because localhost:8080 works over http, but I only had https://* allowed in my config.xml. |
|
Not only ios issue, on android same problem |
|
any new? |
Same issue over here, only on IOS. Moving away from firebase auth, at least for now |
Same issue here, but on Android. Tried downgrading to [email protected] , but no luck on that either. It tries redirecting back to localhost:8100 in chrome, which obviously doesn't exist. Tried: |
yes it exists in android too |
I have had the same issue, on iOS 12 at least of it never redirecting back to the app successfully. Instead it eventually ends up at about:blank and the browser tab doesn't close. It seems that the app goes to sleep when the sign in window is opened and isn't running when the callback is passed. To solve this I installed https://github.com/katzer/cordova-plugin-background-mode and set it to keep the app awake in the background using cordova.plugins.backgroundMode.enable() I plan to just enable and disable as needed but can anyone else check if it solves their problem. |
I can't thank you enough @MatthewPringle!! Actually, all I needed to do was to install
I found that even just installing the plugin and leaving it (by default) disabled solved my problem. Odd but true. I'm not sure what the plugin is doing that is fixing things for me, but I'll take the win. Now to see if this change to my app will get approved by Apple ... |
Actually, this doesn't work for the situation where I get a prompt via the Gmail app for verifying the sign-in event, i.e. I'm switching to the Gmail app which means my app gets backgrounded temporarily. Switching back to my app after the verification in the Gmail app, I see that I still eventually get to the about:blank page. Specifying Time to debug this or find a different solution ... |
It worked with me when I downgrade ios platform to 4.5.4 First: you need to remove the current ios platform: Second: add ios platform version 4.5.4 |
Starting from April 2020 (this month!), Apple will no longer accept hybrid apps that do not use WKWebView. |
I am working with Ionic and Firebaseui. I have followed the example at https://github.com/alexnu/IonicFirebaseUI and I have made the configurations according to https://firebase.google.com/docs/auth/web/cordova.
It works perfectly with Android, but not with IOS.
After sign in with Google or Facebook, it redirects to localhost:8080/var/containers/Bundle/Application/FDAD4E7B-4917-95FA-409157167EEB/appname.app/www/index.html in Safari and shows the message: “Safari cannot open the page because it could not connect to the server”.
I have tried to downgrade to UIWebView, by adding to config.xml:
But, when I do this, if I click the Google or Facebook login button, it shows “This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.”
Ionic: 3.20.0
Firebase: 4.12.1
Firebaseui: 2.7.0
The text was updated successfully, but these errors were encountered: