Last active
September 13, 2019 21:11
-
-
Save Younes-Charfaoui/0e6c7becfadc6edc1e6c34b4c96f3350 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| override fun onVerificationCompleted(credential: PhoneAuthCredential?) { | |
| if (credential != null && storedVerificationId != null) | |
| signInWithPhoneAuthCredential(credential) | |
| else { | |
| Toast.makeText( | |
| this, | |
| "Something went wrong, please try later.", | |
| Toast.LENGTH_LONG).show() | |
| finish() | |
| } | |
| } | |
| override fun onVerificationFailed(exception: FirebaseException?) { | |
| Toast.makeText( | |
| this, "Something went wrong, try again later please.", | |
| Toast.LENGTH_LONG).show() | |
| finish() | |
| } | |
| override fun onCodeSent( | |
| verificationId: String?, | |
| token: PhoneAuthProvider.ForceResendingToken? | |
| ) { | |
| storedVerificationId = verificationId!! | |
| resendToken = token!! | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment