I am trying to login to firebase using google login. The google login is successful. After this I invoke authWithOAuthToken and I am getting below error.
Due to another authentication attempt, this authentication attempt was aborted before it could complete. Error Code = -5
Few other questions:
- Do we need to call authWithOAuthToken at all (after google login)? I noticed I could add data to firebase database even without call.
- If above is not required, how can I get uid (which is firebase user id same across providers). At present we can get this from AuthData.
Code Snippet Below.
baseFirebaseRef.authWithOAuthToken("google", oAuthTokenStr, new Firebase.AuthResultHandler() {
// @Override
public void onAuthenticated(AuthData authData) {
// the Google user is now authenticated with your Firebase app
Log.d(currentScreenName, "------On Firebase Authentication. Success");
}
// @Override
public void onAuthenticationError(FirebaseError firebaseError) {
// there was an error
Log.e(currentScreenName, "------Error On Firebase Authentication......." + firebaseError.getDetails() +
"Error Message = "+ firebaseError.getMessage() + " Error Code = "+ firebaseError.getCode()) ;
}
});