Reputation: 467
I'm getting a error like:
Projects created at console.firebase.google.com must use the new Firebase Authentication SDKs available from firebase.google.com/docs/auth/
when I'm calling:
Firebase authenticateUser = new Firebase(ReferenceUrl.FIREBASE_CHAT_URL); // Get app main firebase url
authenticateUser.authWithPassword(userName, passWord, authResultHandler);
I have created a project in Firebase and added the JSON file in app module and added the
compile com.google.firebase:firebase-core:9.8.0
library also please need help
Upvotes: 1
Views: 1030
Reputation: 6360
Use below method authenticate firebase sign in:
FirebaseAuth.getInstance().signInWithEmailAndPassword(email,password).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
//display some message here
Toast.makeText(Registration.this, "Successfully Signed In", Toast.LENGTH_LONG).show();
} else {
//display some message here
Toast.makeText(Registration.this, "Signed In Error", Toast.LENGTH_LONG).show();
}
}
});
Hope this will help you.
Upvotes: 2