question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error with $signInWithPopup method on Ionic 1 and Angular 1: This operation is not supported in the environment this application is running on. "location.protocol" must be http or https.

See original GitHub issue

After upgrading to Firebase 3 and Angularfire 2.0.1 on an Ionic 1 / Angular 1 application, I am getting the following error when trying to bring an auth popup from firebase (worked with the older methods): This operation is not supported in the environment this application is running on. “location.protocol” must be http or https.

The method I use is the $signInWithPopup method

Sample code:

var provider = new firebase.auth.GoogleAuthProvider();
Auth.$signInWithPopup(provider).then(function(authData) {
    // User successfully logged in
}).catch(function(error) {
    // Login error
});

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
henryspiveycommented, Aug 28, 2016

@jwngr Do you know when Cordova / Ionic will support popup / redirect sign in methods in Firebase v3?

0reactions
jwngrcommented, Mar 20, 2017

We recently did some work to get signInWithPopup() working in Chrome extensions, but I don’t think that covers the Cordova / Ionic use case. We are working through these issues though. Keep an eye on the release notes for future improvements.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular with Cordova and Ionic Firebase ... - Stack Overflow
OK according to the firebase documentation for the signInWithPopup() method your error means the following:.
Read more >
Ionic 1 and Angular 1 Firebase running on iOS and Android ...
Error : This operation is not supported in the environment this application is running on. "location.protocol" must be http or https and web...
Read more >
Firebase auth/operation-not-supported-in-this-environment ...
I'm having a problem with Capacitor when logging in to Firebase via GoogleAuthProvider. const provider = new firebase.auth.
Read more >
signinwithpopup not working - You.com | The Search Engine You ...
I have this working fine using the signInWithRedirect() firebase auth method. However, i cannot get the signInWithPopup() method to work. A new electron...
Read more >
Easily add sign-in to your Web app with FirebaseUI - Google
Warning: FirebaseUI is not currently compatible with the v9 modular SDK. ... <script src="https://www.gstatic.com/firebasejs/ui/6.0.1/firebase-ui-auth.js">< ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found