我是Firebase的新用戶,因此深表感謝。我正在編寫Java服務器端測試代碼。我從數據庫中抓取了多個用戶,並試圖將數據遷移到Firebase中的用戶身份驗證節點。我的代碼從數據庫中選擇一些用戶,爲每個用戶創建一個新線程。Firebase身份驗證限制
第一個線程連接並驗證成功。隨後的同時身份驗證嘗試失敗,並顯示以下錯誤消息。每個線程都有自己的Firebase參考對象實例。同時登錄的數量是否有限制,可能來自同一個IP地址?尚未能在文檔中找到任何內容。
如果我將代碼更改爲在單個線程中運行並逐個登錄並註銷每個用戶,那麼我不會收到錯誤。
任何洞察力非常讚賞。
Message: -5
Message: Due to another authentication attempt, this authentication attempt was aborted before it could complete.
Firebase ref = new Firebase("https://<instance>.firebaseio.com/");
ref.authWithPassword(mEmail, mPassword, new Firebase.AuthResultHandler() {
@Override
public void onAuthenticated(AuthData authData) {
System.out.println("Successfully authenticated: " + mEmail);
user.setUID(authData.getUid());
user.setCurrentUserRef(ref);
done.set(true);
}
@Override
public void onAuthenticationError(FirebaseError firebaseError) {
System.out.println("Error during authentication: " + mEmail);
System.out.println("Error during authentication: " + ref.toString());
System.out.println("Message: " + firebaseError.getCode());
System.out.println("Message: " + firebaseError.getDetails());
System.out.println("Message: " + firebaseError.getMessage());
done.set(true);
}});
waitForCompletion(this.getClass().getName());
交叉帖子:https://groups.google.com/forum/#!topic/firebase-talk/qxqPAy1PIO8 –