You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs-devsite/auth.md
+14-5Lines changed: 14 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -43,7 +43,7 @@ Firebase Authentication
43
43
|[signInWithCustomToken(auth, customToken)](./auth.md#signinwithcustomtoken)| Asynchronously signs in using a custom token. |
44
44
|[signInWithEmailAndPassword(auth, email, password)](./auth.md#signinwithemailandpassword)| Asynchronously signs in using an email and password. |
45
45
|[signInWithEmailLink(auth, email, emailLink)](./auth.md#signinwithemaillink)| Asynchronously signs in using an email and sign-in email link. |
46
-
|[signInWithPhoneNumber(auth, phoneNumber, appVerifier)](./auth.md#signinwithphonenumber)| Asynchronously signs in using a phone number. |
46
+
|[signInWithPhoneNumber(auth, phoneNumber, appVerifier, useWebOTP, webOTPTimeout)](./auth.md#signinwithphonenumber)| Asynchronously signs in using a phone number. |
47
47
|[signInWithPopup(auth, provider, resolver)](./auth.md#signinwithpopup)| Authenticates a Firebase client using a popup-based OAuth authentication flow. |
48
48
|[signInWithRedirect(auth, provider, resolver)](./auth.md#signinwithredirect)| Authenticates a Firebase client using a full-page redirect flow. |
49
49
|[signOut(auth)](./auth.md#signout)| Signs out the current user. |
This method sends a code via SMS to the given phone number, and returns a [ConfirmationResult](./auth.confirmationresult.md#confirmationresult_interface)<!---->. After the user provides the code sent to their phone, call [ConfirmationResult.confirm()](./auth.confirmationresult.md#confirmationresultconfirm) with the code to sign the user in.
881
+
This method sends a code via SMS to the given phone number. It returns a [ConfirmationResult](./auth.confirmationresult.md#confirmationresult_interface) if is set to false. If is set to true, the method will return a [UserCredential](./auth.usercredential.md#usercredential_interface)<!---->.
882
+
883
+
If is set to `false`<!---->, webOTP autofill is disabled. After the user provides the code sent to their phone, call [ConfirmationResult.confirm()](./auth.confirmationresult.md#confirmationresultconfirm) with the code to sign the user in. [ConfirmationResult](./auth.confirmationresult.md#confirmationresult_interface) is returned.
884
+
885
+
If is set to `true`<!---->, webOTP autofill is enabled and the verfication code is automatically fetched, then [ConfirmationResult.confirm()](./auth.confirmationresult.md#confirmationresultconfirm) will be called with the code to sign the user in. [UserCredential](./auth.usercredential.md#usercredential_interface) is returned.
882
886
883
887
For abuse prevention, this method also requires a [ApplicationVerifier](./auth.applicationverifier.md#applicationverifier_interface)<!---->. This SDK includes a reCAPTCHA-based implementation, [RecaptchaVerifier](./auth.recaptchaverifier.md#recaptchaverifier_class)<!---->. This function can work on other platforms that do not support the [RecaptchaVerifier](./auth.recaptchaverifier.md#recaptchaverifier_class) (like React Native), but you need to use a third-party [ApplicationVerifier](./auth.applicationverifier.md#applicationverifier_interface) implementation.
884
888
@@ -887,7 +891,7 @@ This method does not work in a Node.js environment.
@@ -897,18 +901,23 @@ export declare function signInWithPhoneNumber(auth: Auth, phoneNumber: string, a
897
901
| auth |[Auth](./auth.auth.md#auth_interface)| The [Auth](./auth.auth.md#auth_interface) instance. |
898
902
| phoneNumber | string | The user's phone number in E.164 format (e.g. +16505550101). |
899
903
| appVerifier |[ApplicationVerifier](./auth.applicationverifier.md#applicationverifier_interface)| The [ApplicationVerifier](./auth.applicationverifier.md#applicationverifier_interface)<!---->. |
904
+
| useWebOTP | boolean | Specifies whether to use WebOTP autofill or not in the sign in |
905
+
| webOTPTimeout | number | Error would be thrown if WebOTP autofill is used and does not resolve within this specified timeout parameter (milliseconds). |
0 commit comments