I have experienced very strange behaviour trying to do Firebase authnetication. Even more, I made a version that works and one that does not. First, the version that works:<
Resolved!
I realized it has something with Content Security Policy, tried various options, and here is the solution. First, instead of inline
onClick="loginToFirebase();"
I had to register event listener
function initApp(){
document.getElementById('mybutton')
.addEventListener('click', loginToFirebase);
}
window.onload = function() {
initApp();
}
This was not the end of my problems, tried to specify Content Security Policy, but with no result.
After very thoroughly looking at Firebase demo code, I decided to remove <form>
tag and that was it!
Hope, it will help someone :)