Skip to content

Commit 5639e6d

Browse files
authored
Deprecate PhoneAuthProvider.MaxTimeoutMs (Fixed #54) (#470)
* Deprecate `PhoneAuthProvider.MaxTimeoutMs` This is a read-only valued used to set the upper bound for `autoVerifyTimeOutMs`. However, the value was set too low. Android SDK has increase the range to 30 to 120 seconds, while iOS SDK does not have a way to override timeout. This is a change to deprecate this public property so that the underlying SDK can determine the range for timeout.
1 parent 47295d3 commit 5639e6d

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

auth/src/PhoneAuthProvider.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ namespace Firebase.Auth {
5959
public sealed class PhoneAuthProvider : global::System.IDisposable {
6060
/// Maximum value of `autoVerifyTimeOutMs` in @ref VerifyPhoneNumber.
6161
/// @ref VerifyPhoneNumber will automatically clamp values to this amount.
62+
///
63+
/// @deprecated This value is no longer used to clamp
64+
/// `autoVerifyTimeOutMs` in @ref VerifyPhoneNumber. The range is
65+
/// determined by the underlying SDK, ex. <a href="/docs/reference/android/com/google/firebase/auth/PhoneAuthOptions.Builder"><code>PhoneAuthOptions.Build</code> in Android SDK</a>
66+
[System.Obsolete("PhoneAuthProvider.MaxTimeoutMs is deprecated. This value no longer affects PhoneAuthProvider.VerifyPhoneNumber()")]
6267
public static uint MaxTimeoutMs {
6368
get {
6469
return PhoneAuthProviderInternal.kMaxTimeoutMs;
@@ -212,7 +217,6 @@ private static void InitializeCallbacks() {
212217
/// miliseconds. Currently SMS auto retrieval is only supported on Android.
213218
/// If 0, do not do SMS auto retrieval.
214219
/// If positive, try to auto-retrieve the SMS verification code.
215-
/// If larger than MaxTimeoutMs, clamped to MaxTimeoutMs.
216220
/// When the time out is exceeded, `codeAutoRetrievalTimeOut`
217221
/// is called.
218222
/// @param[in] forceResendingToken If NULL, assume this is a new phone
@@ -247,7 +251,6 @@ public void VerifyPhoneNumber(string phoneNumber, uint autoVerifyTimeOutMs,
247251
/// miliseconds. Currently SMS auto retrieval is only supported on Android.
248252
/// If 0, do not do SMS auto retrieval.
249253
/// If positive, try to auto-retrieve the SMS verification code.
250-
/// If larger than MaxTimeoutMs, clamped to MaxTimeoutMs.
251254
/// When the time out is exceeded, `codeAutoRetrievalTimeOut`
252255
/// is called.
253256
/// @param[in] forceResendingToken If NULL, assume this is a new phone
@@ -287,7 +290,6 @@ public void VerifyPhoneNumber(string phoneNumber, uint autoVerifyTimeOutMs,
287290
/// miliseconds. Currently SMS auto retrieval is only supported on Android.
288291
/// If 0, do not do SMS auto retrieval.
289292
/// If positive, try to auto-retrieve the SMS verification code.
290-
/// If larger than MaxTimeoutMs, clamped to MaxTimeoutMs.
291293
/// When the time out is exceeded, `codeAutoRetrievalTimeOut`
292294
/// is called.
293295
/// @param[in] forceResendingToken If NULL, assume this is a new phone
@@ -324,7 +326,6 @@ public void VerifyPhoneNumber(string phoneNumber, uint autoVerifyTimeOutMs,
324326
/// miliseconds. Currently SMS auto retrieval is only supported on Android.
325327
/// If 0, do not do SMS auto retrieval.
326328
/// If positive, try to auto-retrieve the SMS verification code.
327-
/// If larger than MaxTimeoutMs, clamped to MaxTimeoutMs.
328329
/// When the time out is exceeded, `codeAutoRetrievalTimeOut`
329330
/// is called.
330331
/// @param[in] forceResendingToken If NULL, assume this is a new phone

docs/readme.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ Support
155155

156156
Release Notes
157157
-------------
158+
### Upcoming
159+
- Changes
160+
- Auth (Android/iOS): Deprecate `PhoneAuthProvider.MaxTimeoutMs`. The actual
161+
range is determined by the underlying SDK, ex. [PhoneAuthOptions.Builder in Android SDK](https://firebase.google.com/docs/reference/android/com/google/firebase/auth/PhoneAuthOptions.Builder).
162+
158163
### 9.6.0
159164
- Changes
160165
- General: Updated Firebase C++ SDK dependencies to v9.6.0.

0 commit comments

Comments
 (0)