Facebook just introduced Account Kit at F8 2016.
It enables app users to log in using their phone number or email address.
I already tried to use it\'s returned
I got the following answer in the Firebase Google Group:
Yeah, after discussing with another Firebase engineer, I'm pretty sure Firebase Authentication does not actually support Account Kit. Sorry. We have no plans to support it in the works, but will revisit if we get enough people asking for it.
Yes, it's possible using Firebase Custom Authentication.
You need to setup an authentication server which can create Firebase custom tokens, using the accountkit user id or phone number as the uid.
Once you receive the custom token from the authentication server, you then use it to sign into firebase like this:
mAuth.signInWithCustomToken(mCustomToken)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
Log.d(TAG, "signInWithCustomToken:onComplete:" + task.isSuccessful());
if (!task.isSuccessful()) {
Log.w(TAG, "signInWithCustomToken", task.getException());
Toast.makeText(CustomAuthActivity.this, "Authentication failed.",
Toast.LENGTH_SHORT).show();
}
}
});
This blog post has a detailed step-by-step guide on how to implement it.