Skip to content

Commit 8a0f6b9

Browse files
committed
Add changeset and refdocs
1 parent f7223fc commit 8a0f6b9

File tree

5 files changed

+18
-7
lines changed

5 files changed

+18
-7
lines changed

.changeset/rare-radios-leave.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/auth': minor
3+
---
4+
5+
Added reCAPTCHA Enterprise support for app verification during phone authentication

docs-devsite/auth.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -923,7 +923,9 @@ Asynchronously signs in using a phone number.
923923

924924
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.
925925

926-
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.
926+
For abuse prevention with reCAPTCHA v2, this method requires a [ApplicationVerifier](./auth.applicationverifier.md#applicationverifier_interface)<!-- -->. This SDK includes a reCAPTCHA-v2-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.
927+
928+
For abuse prevention with reCAPTCHA Enterprise, [ApplicationVerifier](./auth.applicationverifier.md#applicationverifier_interface) is required in Audit mode but not in Enforce mode.
927929

928930
This method does not work in a Node.js environment or with [Auth](./auth.auth.md#auth_interface) instances created with a [FirebaseServerApp](./app.firebaseserverapp.md#firebaseserverapp_interface)<!-- -->.
929931

docs-devsite/auth.phoneauthprovider.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ verifyPhoneNumber(phoneOptions: PhoneInfoOptions | string, applicationVerifier?:
211211
| Parameter | Type | Description |
212212
| --- | --- | --- |
213213
| phoneOptions | [PhoneInfoOptions](./auth.md#phoneinfooptions) \| string | |
214-
| applicationVerifier | [ApplicationVerifier](./auth.applicationverifier.md#applicationverifier_interface) | 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)<!-- -->. |
214+
| applicationVerifier | [ApplicationVerifier](./auth.applicationverifier.md#applicationverifier_interface) | For abuse prevention with reCAPTCHA v2, this method requires a [ApplicationVerifier](./auth.applicationverifier.md#applicationverifier_interface)<!-- -->. This SDK includes a reCAPTCHA-v2-based implementation, [RecaptchaVerifier](./auth.recaptchaverifier.md#recaptchaverifier_class)<!-- -->. For abuse prevention with reCAPTCHA Enterprise, [ApplicationVerifier](./auth.applicationverifier.md#applicationverifier_interface) is required in Audit mode but not in Enforce mode. |
215215

216216
<b>Returns:</b>
217217

packages/auth/src/platform_browser/providers/phone.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,10 @@ export class PhoneAuthProvider {
9595
*
9696
* @param phoneInfoOptions - The user's {@link PhoneInfoOptions}. The phone number should be in
9797
* E.164 format (e.g. +16505550101).
98-
* @param applicationVerifier - For abuse prevention, this method also requires a
99-
* {@link ApplicationVerifier}. This SDK includes a reCAPTCHA-based implementation,
100-
* {@link RecaptchaVerifier}.
98+
* @param applicationVerifier - For abuse prevention with reCAPTCHA v2, this method requires a
99+
* {@link ApplicationVerifier}. This SDK includes a reCAPTCHA-v2-based implementation,
100+
* {@link RecaptchaVerifier}. For abuse prevention with reCAPTCHA Enterprise,
101+
* {@link ApplicationVerifier} is required in Audit mode but not in Enforce mode.
101102
*
102103
* @returns A Promise for a verification ID that can be passed to
103104
* {@link PhoneAuthProvider.credential} to identify this flow.

packages/auth/src/platform_browser/strategies/phone.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,15 @@ class ConfirmationResultImpl implements ConfirmationResult {
102102
* provides the code sent to their phone, call {@link ConfirmationResult.confirm}
103103
* with the code to sign the user in.
104104
*
105-
* For abuse prevention, this method also requires a {@link ApplicationVerifier}.
106-
* This SDK includes a reCAPTCHA-based implementation, {@link RecaptchaVerifier}.
105+
* For abuse prevention with reCAPTCHA v2, this method requires a {@link ApplicationVerifier}.
106+
* This SDK includes a reCAPTCHA-v2-based implementation, {@link RecaptchaVerifier}.
107107
* This function can work on other platforms that do not support the
108108
* {@link RecaptchaVerifier} (like React Native), but you need to use a
109109
* third-party {@link ApplicationVerifier} implementation.
110110
*
111+
* For abuse prevention with reCAPTCHA Enterprise, {@link ApplicationVerifier} is required in Audit
112+
* mode but not in Enforce mode.
113+
*
111114
* This method does not work in a Node.js environment or with {@link Auth} instances created with a
112115
* {@link @firebase/app#FirebaseServerApp}.
113116
*

0 commit comments

Comments
 (0)