Adventarを支える技術 Advent Calendar 2019 の8日目です。 今日は Firebase Authentication で苦労した点や工夫した点について書きます。 ログインの判定が遅い問題 Firebase Authentication を使って、現在のセッションがログインしているかどうかを検出するには、firebase.auth().onAuthStateChanged ()を呼び出します。 https://firebase.google.com/docs/auth/web/manage-users firebase.auth().onAuthStateChanged(function(user) { if (user) { // User is signed in. } else { // No user is signed in. } }); しかし、この処理