Last active
September 17, 2021 16:01
-
-
Save a914-gowtham/c5b3747b80f67ad47e64d2cfa195e687 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun signInWithPhoneAuthCredential(credential: PhoneAuthCredential) { | |
FirebaseAuth.getInstance().signInWithCredential(credential) | |
.addOnCompleteListener { task -> | |
if (task.isSuccessful) { | |
Timber.v("signInWithCredential:success ${taskId.result?.user?.uid}") | |
} else { | |
Timber.v("signInWithCredential:failure ${task.exception}") | |
if (task.exception is FirebaseAuthInvalidCredentialsException) | |
context.toast("Invalid verification code!") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment