Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit c31c42d

Browse files
committed
Feat: extend FirebasePhoneLoginOptions with android timeout parameter
1 parent ab035e4 commit c31c42d

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

src/firebase.android.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,9 +985,10 @@ firebase.login = arg => {
985985

986986
firebase._verifyPhoneNumberInProgress = true;
987987

988+
let timeout = arg.phoneOptions.android ? arg.phoneOptions.android.timeout : 60;
988989
com.google.firebase.auth.PhoneAuthProvider.getInstance().verifyPhoneNumber(
989990
arg.phoneOptions.phoneNumber,
990-
60, // timeout (in seconds, because of the next argument)
991+
timeout, // timeout (in seconds, because of the next argument)
991992
java.util.concurrent.TimeUnit.SECONDS,
992993
appModule.android.foregroundActivity,
993994
new OnVerificationStateChangedCallbacks());

src/firebase.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,9 @@ export interface FirebasePhoneLoginOptions {
268268
* Default: "Verification code".
269269
*/
270270
verificationPrompt?: string;
271+
android?: {
272+
timeout: number;
273+
}
271274
}
272275

273276
export interface FirebaseGoogleLoginOptions {

0 commit comments

Comments
 (0)