In facebook login callback return success but firebase auth.signInWithCredential is return task is not successfull with exception; FirebaseAuthInvalidCredentialsException:The supplied auth credential is malformed or has expired. [ Remote site 5XX from facebook.com for USER_INFO ]
My facebook developer app type is Gaming services. When i looking on the web for solution, some say change apptype is work but imposibble due to app is live. Any suggestion?
binding.btnFacebookMan.registerCallback(callbackManager,object :
FacebookCallback<LoginResult> {
override fun onCancel() {
Log.d("log","facebook login cancelled")
}
override fun onError(error: FacebookException) {
Log.d("log","facebook ${error.message}")
}
override fun onSuccess(result: LoginResult) {
val credential = FacebookAuthProvider.getCredential(result.accessToken.token)
auth.signInWithCredential(credential).addOnCompleteListener(act) {task->
if(task.isSuccessful) {
Log.d("log","taskSuccess")
val mail = task.result.user?.email
val uid = task.result.user?.uid
} else {
Log.d("log","taskFail")
Log.d("log","${task.exception}")
loader.dismiss()
}
}
}
})