0
我試圖讓vuefire/vue/firebase在有身份驗證和單獨用戶時工作。我可以得到它當我通過手動將UID工作...Firebase Vue Vuefire UID不及時
let booksRef = db.ref('Users/' + 'SOhUKhcWzVRZmqe3AfcWMRwQR4r2' + '/Books');
但是,當我試着和一個來自火力地堡取代硬編碼的UID,我得到一個空的結果......這是基本上不準備在調用的時候,即使用戶登錄...:
beforeCreate: function() {
var context = this;
Firebase.auth().onAuthStateChanged(function(user) {
if (user) {
currentUser = user;
context.currentUserId = user.uid;
context.currentUserEmail = user.email;
context.signedIn = true;
}
else {
context.currentUserId = null;
context.currentUserEmail = null; }
});
我怎麼能保證我第一次獲得UID之前,我創建路徑到數據集?
謝謝!