@@ -43,6 +43,7 @@ using ::firebase::auth::kAuthErrorInvalidCredential;
43
43
using ::firebase::auth::kAuthErrorInvalidProviderId ;
44
44
using ::firebase::auth::kAuthErrorNone ;
45
45
using ::firebase::auth::OAuthProvider;
46
+ using ::firebase::auth::PhoneAuthOptions;
46
47
using ::firebase::auth::PhoneAuthProvider;
47
48
using ::firebase::auth::PhoneAuthCredential;
48
49
using ::firebase::auth::PlayGamesAuthProvider;
@@ -601,8 +602,10 @@ extern "C" int common_main(int argc, const char* argv[]) {
601
602
" Phone Number" , " Please enter your phone number" , " +12345678900" );
602
603
PhoneListener listener;
603
604
PhoneAuthProvider& phone_provider = PhoneAuthProvider::GetInstance (auth);
604
- phone_provider.VerifyPhoneNumber (phone_number.c_str (), kPhoneAuthTimeoutMs ,
605
- nullptr , &listener);
605
+ PhoneAuthOptions options;
606
+ options.phone_number = phone_number;
607
+ options.timeout_milliseconds = kPhoneAuthTimeoutMs ;
608
+ phone_provider.VerifyPhoneNumber (options, &listener);
606
609
607
610
// Wait for OnCodeSent() callback.
608
611
int wait_ms = 0 ;
@@ -634,7 +637,7 @@ extern "C" int common_main(int argc, const char* argv[]) {
634
637
LogMessage (" ." );
635
638
}
636
639
if (listener.num_calls_on_code_auto_retrieval_time_out () > 0 ) {
637
- const Credential phone_credential = phone_provider.GetCredential (
640
+ const PhoneAuthCredential phone_credential = phone_provider.GetCredential (
638
641
listener.verification_id ().c_str (), verification_code.c_str ());
639
642
640
643
Future<User>phone_future =
0 commit comments