mAuth.signInWithCredential(credential)
.addOnCompleteListener(this) {
task ->
if (task.isSuccessful) {
// Sign in success,update UI with the signed-in user's information
Log.d(TAG,"signInWithCredential:success")
} else {
// If sign in fails,display a message to the user.
Log.w(TAG,"signInWithCredential:failure",task.exception)
Toast.makeText(
baseContext,"Authentication failed.",Toast.LENGTH_SHORT
).show()
//updateUI(null)
}
- 如果我使用上述代码通过Firebase登录Facebook,则task.isSuccessful每次都会出错,否则部分将被执行
谢谢!