Skip to content

Instantly share code, notes, and snippets.

@Younes-Charfaoui
Created September 12, 2019 00:19
Show Gist options
  • Save Younes-Charfaoui/3a560f59f88dc5e2a213bd194cec9289 to your computer and use it in GitHub Desktop.
Save Younes-Charfaoui/3a560f59f88dc5e2a213bd194cec9289 to your computer and use it in GitHub Desktop.
private fun signInWithPhoneAuthCredential(credential: PhoneAuthCredential) {
auth.signInWithCredential(credential)
.addOnCompleteListener(this) {
if (it.isSuccessful) {
// Successful mean that the phone is verified, so do whatever you want here.
} else {
Toast.makeText(
this,
"Something went wrong, try again later please.",
Toast.LENGTH_LONG).show()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment