firebase:: auth:: PhoneAuthOptions
#include <credential.h>
Options object for configuring phone validation flows inPhoneAuthProvider.
Summary
Constructors and Destructors | |
|---|---|
PhoneAuthOptions() |
Public attributes | |
|---|---|
force_resending_token | Sets thePhoneAuthProvider::ForceResendingToken to force another verification SMS to be sent before the auto-retrieval timeout. |
phone_number | std::stringThe phone number for sign-in, sign-up, or second factor enrollment. |
timeout_milliseconds | uint32_tThe maximum amount of time you’re willing to wait for SMS auto-retrieval to be completed by the SDK. |
ui_parent | Sets the context to which the callbacks are scoped, and with which app verification will be completed. |
Public attributes
force_resending_token
PhoneAuthProvider::ForceResendingToken*firebase::auth::PhoneAuthOptions::force_resending_token
Sets thePhoneAuthProvider::ForceResendingToken to force another verification SMS to be sent before the auto-retrieval timeout.
If nullptr, assume this is a new phone number to verify. If not-NULL, bypass the verification session deduping and force resending a new SMS. This token is received inPhoneAuthProvider::Listener::OnCodeSent. This should only be used when the user presses a Resend SMS button.
phone_number
std::stringfirebase::auth::PhoneAuthOptions::phone_number
The phone number for sign-in, sign-up, or second factor enrollment.
timeout_milliseconds
uint32_tfirebase::auth::PhoneAuthOptions::timeout_milliseconds
The maximum amount of time you’re willing to wait for SMS auto-retrieval to be completed by the SDK.
This value is supported on Android devices only.
The minimum timeout is 30 seconds, and the maximum timeout is 2 minutes. If you specified a positive value less than 30 seconds, the SDK will default to 30 seconds. Specifying a timeout that is greater than 120 seconds will result in an IllegalArgumentException being thrown.
Use 0 to disable SMS-auto-retrieval. This will also causePhoneAuthProvider::Listener::OnCodeAutoRetrievalTimeOut to be called immediately.
ui_parent
UIParentfirebase::auth::PhoneAuthOptions::ui_parent
Sets the context to which the callbacks are scoped, and with which app verification will be completed.
On Android, the context should be a jobject referencing an Android Activity. On Apple platforms, this should be a pointer to UIView. For any other platforms, the context is ignored.
If ui_parent isn’t defined (ie: nullptr or nil) then the FirebaseApp’s default Activity or UIView will be used.
Public functions
PhoneAuthOptions
firebase::auth::PhoneAuthOptions::PhoneAuthOptions()
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-01-23 UTC.