Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 104: add verificationId in phone auth. #378

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ actual class PhoneAuthProvider(val android: com.google.firebase.auth.PhoneAuthPr
PhoneAuthProvider.OnVerificationStateChangedCallbacks() {

override fun onCodeSent(verificationId: String, forceResending: PhoneAuthProvider.ForceResendingToken) {
verificationProvider.codeSent { android.verifyPhoneNumber(phoneNumber, verificationProvider.timeout, verificationProvider.unit, verificationProvider.activity, this, forceResending) }
verificationProvider.onCodeSent(
verificationId = verificationId,
triggerResend = { android.verifyPhoneNumber(phoneNumber, verificationProvider.timeout, verificationProvider.unit, verificationProvider.activity, this, forceResending) }
)
}

override fun onCodeAutoRetrievalTimeOut(verificationId: String) {
Expand Down Expand Up @@ -123,7 +126,7 @@ actual interface PhoneVerificationProvider {
val activity: Activity
val timeout: Long
val unit: TimeUnit
fun codeSent(triggerResend: (Unit) -> Unit)
fun onCodeSent(verificationId: String, triggerResend: () -> Unit)
suspend fun getVerificationCode(): String
}

Expand Down