2
votes

i am developing a hybrid mobile app in ionic framework using firebase and angularjs. When I try to login with twitter using signInWithPopup('twitter') in browser its works and it gives me a right userdata from twitter but in my android device i'm getting an error like below

code : auth/operation-not-supported-in-this-environment. message : "This operation is not supported in the environment this application is running on. "location.protocol" must be http or https and web storage must be enabled."

i don't know how to solve this issue..

Thanks in advance

2
Welcome to Stackoverflow! Please take some time to read the help pages, especially the sections named "What topics can I ask about here?" and "What types of questions should I avoid asking?". Also please take the tour and read about how to ask good questions. Lastly please learn how to create a Minimal, Complete, and Verifiable Example. - Markus

2 Answers

0
votes

signInWithPopup is not supported for Ionic/Cordova. You need to use signInWithRedirect. Refer to the official documentation on how to support OAuth sign-in for Cordova/Ionic apps: https://firebase.google.com/docs/auth/web/cordova

0
votes

signINWithPopup will work only in the browser it will not work in the ionic. Fire-base solved this problem in the fire-base version of 3.9.0 and please follow the below link and i got my app working fine with Facebook and google and twitter.

https://firebase.google.com/docs/auth/web/cordova