Firebase onAuthStateChanged is being called twice upon login
Solution 1:
Yes this is normal, onAuthStateChanged will keep triggering. You can prevent from multiple calls with this code:
var authFlag = true;
firebase.auth().onAuthStateChanged((res) => {
if(res && authFlag) {
console.log('Firebase - onAuthStateChanged', {res})
authFlag = false;
//rest of your code