@@ -43,6 +43,7 @@ using ::firebase::auth::kAuthErrorInvalidCredential;
4343using ::firebase::auth::kAuthErrorInvalidProviderId ;
4444using ::firebase::auth::kAuthErrorNone ;
4545using ::firebase::auth::OAuthProvider;
46+ using ::firebase::auth::PhoneAuthOptions;
4647using ::firebase::auth::PhoneAuthProvider;
4748using ::firebase::auth::PhoneAuthCredential;
4849using ::firebase::auth::PlayGamesAuthProvider;
@@ -601,8 +602,10 @@ extern "C" int common_main(int argc, const char* argv[]) {
601602 " Phone Number" , " Please enter your phone number" , " +12345678900" );
602603 PhoneListener listener;
603604 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);
606609
607610 // Wait for OnCodeSent() callback.
608611 int wait_ms = 0 ;
@@ -634,7 +637,7 @@ extern "C" int common_main(int argc, const char* argv[]) {
634637 LogMessage (" ." );
635638 }
636639 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 (
638641 listener.verification_id ().c_str (), verification_code.c_str ());
639642
640643 Future<User>phone_future =
0 commit comments