Skip to content

Commit d5436c6

Browse files
Madrigal Jiménez RubénMadrigal Jiménez Rubén
authored andcommitted
fix: Add missing authExtern parameter to RecaptchaVerifier examples
1 parent 620c8ca commit d5436c6

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

docs-devsite/auth.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -975,7 +975,7 @@ Promise<[ConfirmationResult](./auth.confirmationresult.md#confirmationresult_
975975

976976
```javascript
977977
// 'recaptcha-container' is the ID of an element in the DOM.
978-
const applicationVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');
978+
const applicationVerifier = new RecaptchaVerifier(auth, 'recaptcha-container');
979979
const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);
980980
// Obtain a verificationCode from the user.
981981
const credential = await confirmationResult.confirm(verificationCode);
@@ -1745,7 +1745,7 @@ Promise<void>
17451745

17461746
```
17471747
// 'recaptcha-container' is the ID of an element in the DOM.
1748-
const applicationVerifier = new RecaptchaVerifier('recaptcha-container');
1748+
const applicationVerifier = new RecaptchaVerifier(auth, 'recaptcha-container');
17491749
const provider = new PhoneAuthProvider(auth);
17501750
const verificationId = await provider.verifyPhoneNumber('+16505550101', applicationVerifier);
17511751
// Obtain the verificationCode from the user.

docs-devsite/auth.phoneauthprovider.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ const userCredential = confirmationResult.confirm(verificationCode);
247247

248248
```javascript
249249
// 'recaptcha-container' is the ID of an element in the DOM.
250-
const applicationVerifier = new RecaptchaVerifier('recaptcha-container');
250+
const applicationVerifier = new RecaptchaVerifier(auth, 'recaptcha-container');
251251
const provider = new PhoneAuthProvider(auth);
252252
const verificationId = await provider.verifyPhoneNumber('+16505550101', applicationVerifier);
253253
// Obtain the verificationCode from the user.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ import { ProviderId, SignInMethod } from '../../model/enums';
4343
* @example
4444
* ```javascript
4545
* // 'recaptcha-container' is the ID of an element in the DOM.
46-
* const applicationVerifier = new RecaptchaVerifier('recaptcha-container');
46+
* const applicationVerifier = new RecaptchaVerifier(auth, 'recaptcha-container');
4747
* const provider = new PhoneAuthProvider(auth);
4848
* const verificationId = await provider.verifyPhoneNumber('+16505550101', applicationVerifier);
4949
* // Obtain the verificationCode from the user.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class ConfirmationResultImpl implements ConfirmationResult {
117117
* @example
118118
* ```javascript
119119
* // 'recaptcha-container' is the ID of an element in the DOM.
120-
* const applicationVerifier = new firebase.auth.RecaptchaVerifier('recaptcha-container');
120+
* const applicationVerifier = new RecaptchaVerifier(auth, 'recaptcha-container');
121121
* const confirmationResult = await signInWithPhoneNumber(auth, phoneNumber, applicationVerifier);
122122
* // Obtain a verificationCode from the user.
123123
* const credential = await confirmationResult.confirm(verificationCode);
@@ -435,7 +435,7 @@ export async function _verifyPhoneNumber(
435435
* @example
436436
* ```
437437
* // 'recaptcha-container' is the ID of an element in the DOM.
438-
* const applicationVerifier = new RecaptchaVerifier('recaptcha-container');
438+
* const applicationVerifier = new RecaptchaVerifier(auth, 'recaptcha-container');
439439
* const provider = new PhoneAuthProvider(auth);
440440
* const verificationId = await provider.verifyPhoneNumber('+16505550101', applicationVerifier);
441441
* // Obtain the verificationCode from the user.

0 commit comments

Comments
 (0)