@firebase/auth 1.13.2 → 1.13.3-20260615181107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser-cjs/{index-cb4d4017.js → index-1f558345.js} +42 -8
- package/dist/browser-cjs/index-1f558345.js.map +1 -0
- package/dist/browser-cjs/index.js +1 -1
- package/dist/browser-cjs/internal.js +1 -1
- package/dist/browser-cjs/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +18 -0
- package/dist/browser-cjs/test/helpers/mock_loadjs.d.ts +17 -0
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +2 -2
- package/dist/cordova/{popup_redirect-66dd494e.js → popup_redirect-c0dec4fb.js} +43 -9
- package/dist/cordova/popup_redirect-c0dec4fb.js.map +1 -0
- package/dist/cordova/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +18 -0
- package/dist/cordova/test/helpers/mock_loadjs.d.ts +17 -0
- package/dist/esm/{index-9d184c40.js → index-139892c1.js} +43 -9
- package/dist/esm/index-139892c1.js.map +1 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal.js +2 -2
- package/dist/esm/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +18 -0
- package/dist/esm/test/helpers/mock_loadjs.d.ts +17 -0
- package/dist/index.webworker.js +42 -8
- package/dist/index.webworker.js.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/internal.js +1 -1
- package/dist/node/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +18 -0
- package/dist/node/test/helpers/mock_loadjs.d.ts +17 -0
- package/dist/node/{totp-90def736.js → totp-4803792f.js} +42 -8
- package/dist/node/totp-4803792f.js.map +1 -0
- package/dist/node-esm/index.js +1 -1
- package/dist/node-esm/internal.js +2 -2
- package/dist/node-esm/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +18 -0
- package/dist/node-esm/test/helpers/mock_loadjs.d.ts +17 -0
- package/dist/node-esm/{totp-5d40279f.js → totp-2a4487f1.js} +43 -9
- package/dist/node-esm/totp-2a4487f1.js.map +1 -0
- package/dist/rn/{index-d963ed8d.js → index-a4f26c54.js} +42 -8
- package/dist/rn/index-a4f26c54.js.map +1 -0
- package/dist/rn/index.js +1 -1
- package/dist/rn/internal.js +2 -2
- package/dist/rn/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +18 -0
- package/dist/rn/test/helpers/mock_loadjs.d.ts +17 -0
- package/dist/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +18 -0
- package/dist/test/helpers/mock_loadjs.d.ts +17 -0
- package/dist/web-extension-cjs/index.js +1 -1
- package/dist/web-extension-cjs/internal.js +1 -1
- package/dist/web-extension-cjs/{register-5aa6f443.js → register-d3246200.js} +42 -8
- package/dist/web-extension-cjs/register-d3246200.js.map +1 -0
- package/dist/web-extension-cjs/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +18 -0
- package/dist/web-extension-cjs/test/helpers/mock_loadjs.d.ts +17 -0
- package/dist/web-extension-esm/index.js +2 -2
- package/dist/web-extension-esm/internal.js +2 -2
- package/dist/web-extension-esm/{register-01796967.js → register-afae00a4.js} +43 -9
- package/dist/web-extension-esm/register-afae00a4.js.map +1 -0
- package/dist/web-extension-esm/src/platform_browser/recaptcha/recaptcha_enterprise_verifier.d.ts +18 -0
- package/dist/web-extension-esm/test/helpers/mock_loadjs.d.ts +17 -0
- package/package.json +3 -3
- package/dist/browser-cjs/index-cb4d4017.js.map +0 -1
- package/dist/cordova/popup_redirect-66dd494e.js.map +0 -1
- package/dist/esm/index-9d184c40.js.map +0 -1
- package/dist/node/totp-90def736.js.map +0 -1
- package/dist/node-esm/totp-5d40279f.js.map +0 -1
- package/dist/rn/index-d963ed8d.js.map +0 -1
- package/dist/web-extension-cjs/register-5aa6f443.js.map +0 -1
- package/dist/web-extension-esm/register-01796967.js.map +0 -1
package/dist/node-esm/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ActionCodeOperation, aj as ActionCodeURL, M as AuthCredential, J as AuthErrorCodes, N as EmailAuthCredential, W as EmailAuthProvider, X as FacebookAuthProvider, F as FactorId, Z as GithubAuthProvider, Y as GoogleAuthProvider, Q as OAuthCredential, _ as OAuthProvider, O as OperationType, U as PhoneAuthCredential, P as PhoneAuthProvider, n as PhoneMultiFactorGenerator, q as ProviderId, R as RecaptchaVerifier, $ as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, o as TotpSecret, a0 as TwitterAuthProvider, a8 as applyActionCode, y as beforeAuthStateChanged, a as browserCookiePersistence, b as browserLocalPersistence, m as browserPopupRedirectResolver, c as browserSessionPersistence, a9 as checkActionCode, a7 as confirmPasswordReset, L as connectAuthEmulator, ab as createUserWithEmailAndPassword, H as debugErrorMap, G as deleteUser, ag as fetchSignInMethodsForEmail, ar as getAdditionalUserInfo, p as getAuth, ao as getIdToken, ap as getIdTokenResult, at as getMultiFactorResolver, k as getRedirectResult, V as inMemoryPersistence, i as indexedDBLocalPersistence, K as initializeAuth, v as initializeRecaptchaConfig, ae as isSignInWithEmailLink, a3 as linkWithCredential, l as linkWithPhoneNumber, e as linkWithPopup, h as linkWithRedirect, au as multiFactor, z as onAuthStateChanged, x as onIdTokenChanged, ak as parseActionCodeURL, I as prodErrorMap, a4 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, f as reauthenticateWithPopup, j as reauthenticateWithRedirect, as as reload, E as revokeAccessToken, ah as sendEmailVerification, a6 as sendPasswordResetEmail, ad as sendSignInLinkToEmail, t as setPersistence, a1 as signInAnonymously, a2 as signInWithCredential, a5 as signInWithCustomToken, ac as signInWithEmailAndPassword, af as signInWithEmailLink, s as signInWithPhoneNumber, d as signInWithPopup, g as signInWithRedirect, D as signOut, aq as unlink, C as updateCurrentUser, am as updateEmail, an as updatePassword, u as updatePhoneNumber, al as updateProfile, B as useDeviceLanguage, w as validatePassword, ai as verifyBeforeUpdateEmail, aa as verifyPasswordResetCode } from './totp-
|
|
1
|
+
export { A as ActionCodeOperation, aj as ActionCodeURL, M as AuthCredential, J as AuthErrorCodes, N as EmailAuthCredential, W as EmailAuthProvider, X as FacebookAuthProvider, F as FactorId, Z as GithubAuthProvider, Y as GoogleAuthProvider, Q as OAuthCredential, _ as OAuthProvider, O as OperationType, U as PhoneAuthCredential, P as PhoneAuthProvider, n as PhoneMultiFactorGenerator, q as ProviderId, R as RecaptchaVerifier, $ as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, o as TotpSecret, a0 as TwitterAuthProvider, a8 as applyActionCode, y as beforeAuthStateChanged, a as browserCookiePersistence, b as browserLocalPersistence, m as browserPopupRedirectResolver, c as browserSessionPersistence, a9 as checkActionCode, a7 as confirmPasswordReset, L as connectAuthEmulator, ab as createUserWithEmailAndPassword, H as debugErrorMap, G as deleteUser, ag as fetchSignInMethodsForEmail, ar as getAdditionalUserInfo, p as getAuth, ao as getIdToken, ap as getIdTokenResult, at as getMultiFactorResolver, k as getRedirectResult, V as inMemoryPersistence, i as indexedDBLocalPersistence, K as initializeAuth, v as initializeRecaptchaConfig, ae as isSignInWithEmailLink, a3 as linkWithCredential, l as linkWithPhoneNumber, e as linkWithPopup, h as linkWithRedirect, au as multiFactor, z as onAuthStateChanged, x as onIdTokenChanged, ak as parseActionCodeURL, I as prodErrorMap, a4 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, f as reauthenticateWithPopup, j as reauthenticateWithRedirect, as as reload, E as revokeAccessToken, ah as sendEmailVerification, a6 as sendPasswordResetEmail, ad as sendSignInLinkToEmail, t as setPersistence, a1 as signInAnonymously, a2 as signInWithCredential, a5 as signInWithCustomToken, ac as signInWithEmailAndPassword, af as signInWithEmailLink, s as signInWithPhoneNumber, d as signInWithPopup, g as signInWithRedirect, D as signOut, aq as unlink, C as updateCurrentUser, am as updateEmail, an as updatePassword, u as updatePhoneNumber, al as updateProfile, B as useDeviceLanguage, w as validatePassword, ai as verifyBeforeUpdateEmail, aa as verifyPasswordResetCode } from './totp-2a4487f1.js';
|
|
2
2
|
import '@firebase/app';
|
|
3
3
|
import '@firebase/util';
|
|
4
4
|
import '@firebase/component';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { av as _getInstance, aw as _assert, ax as _signInWithCredential, ay as _reauthenticate, az as _link$1, M as AuthCredential, aA as signInWithIdp, aB as _fail, aC as debugAssert, aD as _persistenceKeyName, aE as _serverAppCurrentUserOperationNotSupportedError, aF as _castAuth, aG as FederatedAuthProvider, aH as BaseOAuthProvider, aI as _emulatorUrl, aJ as _performApiRequest, aK as _isIOS, aL as _isAndroid, aM as _isIOS7Or8, aN as _createError, aO as _isMobileBrowser, aP as _isIE10 } from './totp-
|
|
2
|
-
export { A as ActionCodeOperation, aj as ActionCodeURL, M as AuthCredential, J as AuthErrorCodes, aR as AuthImpl, N as EmailAuthCredential, W as EmailAuthProvider, X as FacebookAuthProvider, F as FactorId, aT as FetchProvider, Z as GithubAuthProvider, Y as GoogleAuthProvider, Q as OAuthCredential, _ as OAuthProvider, O as OperationType, U as PhoneAuthCredential, P as PhoneAuthProvider, n as PhoneMultiFactorGenerator, q as ProviderId, R as RecaptchaVerifier, aU as SAMLAuthCredential, $ as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, o as TotpSecret, a0 as TwitterAuthProvider, aQ as UserImpl, aw as _assert, aF as _castAuth, aB as _fail, aS as _getClientVersion, av as _getInstance, aD as _persistenceKeyName, a8 as applyActionCode, y as beforeAuthStateChanged, a as browserCookiePersistence, b as browserLocalPersistence, m as browserPopupRedirectResolver, c as browserSessionPersistence, a9 as checkActionCode, a7 as confirmPasswordReset, L as connectAuthEmulator, ab as createUserWithEmailAndPassword, H as debugErrorMap, G as deleteUser, ag as fetchSignInMethodsForEmail, ar as getAdditionalUserInfo, p as getAuth, ao as getIdToken, ap as getIdTokenResult, at as getMultiFactorResolver, k as getRedirectResult, V as inMemoryPersistence, i as indexedDBLocalPersistence, K as initializeAuth, v as initializeRecaptchaConfig, ae as isSignInWithEmailLink, a3 as linkWithCredential, l as linkWithPhoneNumber, e as linkWithPopup, h as linkWithRedirect, au as multiFactor, z as onAuthStateChanged, x as onIdTokenChanged, ak as parseActionCodeURL, I as prodErrorMap, a4 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, f as reauthenticateWithPopup, j as reauthenticateWithRedirect, as as reload, E as revokeAccessToken, ah as sendEmailVerification, a6 as sendPasswordResetEmail, ad as sendSignInLinkToEmail, t as setPersistence, a1 as signInAnonymously, a2 as signInWithCredential, a5 as signInWithCustomToken, ac as signInWithEmailAndPassword, af as signInWithEmailLink, s as signInWithPhoneNumber, d as signInWithPopup, g as signInWithRedirect, D as signOut, aq as unlink, C as updateCurrentUser, am as updateEmail, an as updatePassword, u as updatePhoneNumber, al as updateProfile, B as useDeviceLanguage, w as validatePassword, ai as verifyBeforeUpdateEmail, aa as verifyPasswordResetCode } from './totp-
|
|
1
|
+
import { av as _getInstance, aw as _assert, ax as _signInWithCredential, ay as _reauthenticate, az as _link$1, M as AuthCredential, aA as signInWithIdp, aB as _fail, aC as debugAssert, aD as _persistenceKeyName, aE as _serverAppCurrentUserOperationNotSupportedError, aF as _castAuth, aG as FederatedAuthProvider, aH as BaseOAuthProvider, aI as _emulatorUrl, aJ as _performApiRequest, aK as _isIOS, aL as _isAndroid, aM as _isIOS7Or8, aN as _createError, aO as _isMobileBrowser, aP as _isIE10 } from './totp-2a4487f1.js';
|
|
2
|
+
export { A as ActionCodeOperation, aj as ActionCodeURL, M as AuthCredential, J as AuthErrorCodes, aR as AuthImpl, N as EmailAuthCredential, W as EmailAuthProvider, X as FacebookAuthProvider, F as FactorId, aT as FetchProvider, Z as GithubAuthProvider, Y as GoogleAuthProvider, Q as OAuthCredential, _ as OAuthProvider, O as OperationType, U as PhoneAuthCredential, P as PhoneAuthProvider, n as PhoneMultiFactorGenerator, q as ProviderId, R as RecaptchaVerifier, aU as SAMLAuthCredential, $ as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, o as TotpSecret, a0 as TwitterAuthProvider, aQ as UserImpl, aw as _assert, aF as _castAuth, aB as _fail, aS as _getClientVersion, av as _getInstance, aD as _persistenceKeyName, a8 as applyActionCode, y as beforeAuthStateChanged, a as browserCookiePersistence, b as browserLocalPersistence, m as browserPopupRedirectResolver, c as browserSessionPersistence, a9 as checkActionCode, a7 as confirmPasswordReset, L as connectAuthEmulator, ab as createUserWithEmailAndPassword, H as debugErrorMap, G as deleteUser, ag as fetchSignInMethodsForEmail, ar as getAdditionalUserInfo, p as getAuth, ao as getIdToken, ap as getIdTokenResult, at as getMultiFactorResolver, k as getRedirectResult, V as inMemoryPersistence, i as indexedDBLocalPersistence, K as initializeAuth, v as initializeRecaptchaConfig, ae as isSignInWithEmailLink, a3 as linkWithCredential, l as linkWithPhoneNumber, e as linkWithPopup, h as linkWithRedirect, au as multiFactor, z as onAuthStateChanged, x as onIdTokenChanged, ak as parseActionCodeURL, I as prodErrorMap, a4 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, f as reauthenticateWithPopup, j as reauthenticateWithRedirect, as as reload, E as revokeAccessToken, ah as sendEmailVerification, a6 as sendPasswordResetEmail, ad as sendSignInLinkToEmail, t as setPersistence, a1 as signInAnonymously, a2 as signInWithCredential, a5 as signInWithCustomToken, ac as signInWithEmailAndPassword, af as signInWithEmailLink, s as signInWithPhoneNumber, d as signInWithPopup, g as signInWithRedirect, D as signOut, aq as unlink, C as updateCurrentUser, am as updateEmail, an as updatePassword, u as updatePhoneNumber, al as updateProfile, B as useDeviceLanguage, w as validatePassword, ai as verifyBeforeUpdateEmail, aa as verifyPasswordResetCode } from './totp-2a4487f1.js';
|
|
3
3
|
import { isEmpty, querystring, querystringDecode } from '@firebase/util';
|
|
4
4
|
import { _isFirebaseServerApp, SDK_VERSION } from '@firebase/app';
|
|
5
5
|
import '@firebase/component';
|
|
@@ -19,12 +19,30 @@ import { Auth } from '../../model/public_types';
|
|
|
19
19
|
import { AuthInternal } from '../../model/auth';
|
|
20
20
|
export declare const RECAPTCHA_ENTERPRISE_VERIFIER_TYPE = "recaptcha-enterprise";
|
|
21
21
|
export declare const FAKE_TOKEN = "NO_RECAPTCHA";
|
|
22
|
+
export declare const RECAPTCHA_ENTERPRISE_ONLOAD_CALLBACK_NAME = "onFirebaseAuthREInstanceReady";
|
|
23
|
+
declare global {
|
|
24
|
+
interface Window {
|
|
25
|
+
[RECAPTCHA_ENTERPRISE_ONLOAD_CALLBACK_NAME]: () => void;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
22
28
|
export declare class RecaptchaEnterpriseVerifier {
|
|
23
29
|
/**
|
|
24
30
|
* Identifies the type of application verifier (e.g. "recaptcha-enterprise").
|
|
25
31
|
*/
|
|
26
32
|
readonly type = "recaptcha-enterprise";
|
|
27
33
|
private readonly auth;
|
|
34
|
+
/**
|
|
35
|
+
* Deferred that resolves when script tag has been injected onto the page
|
|
36
|
+
* and the script is ready (grecaptcha.ready() and script.onload are not
|
|
37
|
+
* reliable indicators, so this resolves when the global
|
|
38
|
+
* `window[RECAPTCHA_ENTERPRISE_ONLOAD_CALLBACK_NAME]()` callback provided to the recaptcha url param "onload"
|
|
39
|
+
* is triggered).
|
|
40
|
+
* As a static variable this is applied to all instances of the class.
|
|
41
|
+
* This will cause an error if users try to create multiple RecaptchaVerifiers
|
|
42
|
+
* with different Recaptcha Enterprise sitekeys, which should be an
|
|
43
|
+
* unuspported use case.
|
|
44
|
+
*/
|
|
45
|
+
private static scriptInjectionDeferred;
|
|
28
46
|
/**
|
|
29
47
|
*
|
|
30
48
|
* @param authExtern - The corresponding Firebase {@link Auth} instance.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Google LLC
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export declare const mockLoadJS: () => Promise<Event>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SDK_VERSION, _isFirebaseServerApp, _getProvider, _registerComponent, registerVersion, getApp } from '@firebase/app';
|
|
2
|
-
import { ErrorFactory, isBrowserExtension, isMobileCordova, isReactNative, FirebaseError, querystring, isCloudflareWorker, isCloudWorkstation, getModularInstance, base64Decode, getUA, isIE, createSubscribe, deepEqual, pingServer, querystringDecode, extractQuerystring, getDefaultEmulatorHost } from '@firebase/util';
|
|
2
|
+
import { ErrorFactory, isBrowserExtension, isMobileCordova, isReactNative, FirebaseError, querystring, isCloudflareWorker, isCloudWorkstation, getModularInstance, base64Decode, getUA, isIE, createSubscribe, Deferred, deepEqual, pingServer, querystringDecode, extractQuerystring, getDefaultEmulatorHost } from '@firebase/util';
|
|
3
3
|
import { Component } from '@firebase/component';
|
|
4
4
|
import { Logger, LogLevel } from '@firebase/logger';
|
|
5
5
|
|
|
@@ -893,8 +893,8 @@ async function _performApiRequest(auth, method, path, request, customErrorMap =
|
|
|
893
893
|
}
|
|
894
894
|
}
|
|
895
895
|
const query = querystring({
|
|
896
|
-
|
|
897
|
-
|
|
896
|
+
...params,
|
|
897
|
+
key: auth.config.apiKey
|
|
898
898
|
}).slice(1);
|
|
899
899
|
const headers = await auth._getAdditionalHeaders();
|
|
900
900
|
headers["Content-Type" /* HttpHeader.CONTENT_TYPE */] = 'application/json';
|
|
@@ -911,7 +911,7 @@ async function _performApiRequest(auth, method, path, request, customErrorMap =
|
|
|
911
911
|
'RequestInitializerDict' is not implemented."
|
|
912
912
|
https://github.com/cloudflare/next-on-pages/issues/487 */
|
|
913
913
|
if (!isCloudflareWorker()) {
|
|
914
|
-
fetchArgs.referrerPolicy = '
|
|
914
|
+
fetchArgs.referrerPolicy = 'strict-origin-when-cross-origin';
|
|
915
915
|
}
|
|
916
916
|
if (auth.emulatorConfig && isCloudWorkstation(auth.emulatorConfig.host)) {
|
|
917
917
|
fetchArgs.credentials = 'include';
|
|
@@ -3289,6 +3289,7 @@ class MockGreCAPTCHA {
|
|
|
3289
3289
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
3290
3290
|
const RECAPTCHA_ENTERPRISE_VERIFIER_TYPE = 'recaptcha-enterprise';
|
|
3291
3291
|
const FAKE_TOKEN = 'NO_RECAPTCHA';
|
|
3292
|
+
const RECAPTCHA_ENTERPRISE_ONLOAD_CALLBACK_NAME = 'onFirebaseAuthREInstanceReady';
|
|
3292
3293
|
class RecaptchaEnterpriseVerifier {
|
|
3293
3294
|
/**
|
|
3294
3295
|
*
|
|
@@ -3368,8 +3369,13 @@ class RecaptchaEnterpriseVerifier {
|
|
|
3368
3369
|
}
|
|
3369
3370
|
return new Promise((resolve, reject) => {
|
|
3370
3371
|
retrieveSiteKey(this.auth)
|
|
3371
|
-
.then(siteKey => {
|
|
3372
|
-
if (!forceRefresh &&
|
|
3372
|
+
.then(async (siteKey) => {
|
|
3373
|
+
if (!forceRefresh &&
|
|
3374
|
+
isEnterprise(window.grecaptcha) &&
|
|
3375
|
+
// If download has already been initiated, do not trigger another
|
|
3376
|
+
// download, await the promise here.
|
|
3377
|
+
RecaptchaEnterpriseVerifier.scriptInjectionDeferred) {
|
|
3378
|
+
await RecaptchaEnterpriseVerifier.scriptInjectionDeferred.promise;
|
|
3373
3379
|
retrieveRecaptchaToken(siteKey, resolve, reject);
|
|
3374
3380
|
}
|
|
3375
3381
|
else {
|
|
@@ -3379,9 +3385,25 @@ class RecaptchaEnterpriseVerifier {
|
|
|
3379
3385
|
}
|
|
3380
3386
|
let url = _recaptchaEnterpriseScriptUrl();
|
|
3381
3387
|
if (url.length !== 0) {
|
|
3382
|
-
url +=
|
|
3388
|
+
url +=
|
|
3389
|
+
siteKey +
|
|
3390
|
+
`&onload=${RECAPTCHA_ENTERPRISE_ONLOAD_CALLBACK_NAME}`;
|
|
3383
3391
|
}
|
|
3392
|
+
// Existence of deferred indicates download has been initiated.
|
|
3393
|
+
RecaptchaEnterpriseVerifier.scriptInjectionDeferred =
|
|
3394
|
+
new Deferred();
|
|
3395
|
+
/**
|
|
3396
|
+
* Script attached to global window object that will be called
|
|
3397
|
+
* when the ReCAPTCHA Enterprise instance is ready.
|
|
3398
|
+
* grecaptcha.ready() is not reliable when there are multiple
|
|
3399
|
+
* scripts on the page, and script.onload only indicates the
|
|
3400
|
+
* script has downloaded, not that it has initialized.
|
|
3401
|
+
*/
|
|
3402
|
+
window[RECAPTCHA_ENTERPRISE_ONLOAD_CALLBACK_NAME] = () => {
|
|
3403
|
+
RecaptchaEnterpriseVerifier.scriptInjectionDeferred?.resolve();
|
|
3404
|
+
};
|
|
3384
3405
|
_loadJS(url)
|
|
3406
|
+
.then(() => RecaptchaEnterpriseVerifier.scriptInjectionDeferred?.promise)
|
|
3385
3407
|
.then(() => {
|
|
3386
3408
|
retrieveRecaptchaToken(siteKey, resolve, reject);
|
|
3387
3409
|
})
|
|
@@ -3396,6 +3418,18 @@ class RecaptchaEnterpriseVerifier {
|
|
|
3396
3418
|
});
|
|
3397
3419
|
}
|
|
3398
3420
|
}
|
|
3421
|
+
/**
|
|
3422
|
+
* Deferred that resolves when script tag has been injected onto the page
|
|
3423
|
+
* and the script is ready (grecaptcha.ready() and script.onload are not
|
|
3424
|
+
* reliable indicators, so this resolves when the global
|
|
3425
|
+
* `window[RECAPTCHA_ENTERPRISE_ONLOAD_CALLBACK_NAME]()` callback provided to the recaptcha url param "onload"
|
|
3426
|
+
* is triggered).
|
|
3427
|
+
* As a static variable this is applied to all instances of the class.
|
|
3428
|
+
* This will cause an error if users try to create multiple RecaptchaVerifiers
|
|
3429
|
+
* with different Recaptcha Enterprise sitekeys, which should be an
|
|
3430
|
+
* unuspported use case.
|
|
3431
|
+
*/
|
|
3432
|
+
RecaptchaEnterpriseVerifier.scriptInjectionDeferred = null;
|
|
3399
3433
|
async function injectRecaptchaFields(auth, request, action, isCaptchaResp = false, isFakeToken = false) {
|
|
3400
3434
|
const verifier = new RecaptchaEnterpriseVerifier(auth);
|
|
3401
3435
|
let captchaResponse;
|
|
@@ -7167,7 +7201,7 @@ function multiFactor(user) {
|
|
|
7167
7201
|
}
|
|
7168
7202
|
|
|
7169
7203
|
var name = "@firebase/auth";
|
|
7170
|
-
var version = "1.13.
|
|
7204
|
+
var version = "1.13.3-20260615181107";
|
|
7171
7205
|
|
|
7172
7206
|
/**
|
|
7173
7207
|
* @license
|
|
@@ -7577,4 +7611,4 @@ function _isEmptyString(input) {
|
|
|
7577
7611
|
}
|
|
7578
7612
|
|
|
7579
7613
|
export { SAMLAuthProvider as $, ActionCodeOperation as A, useDeviceLanguage as B, updateCurrentUser as C, signOut as D, revokeAccessToken as E, FactorId as F, deleteUser as G, debugErrorMap as H, prodErrorMap as I, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as J, initializeAuth as K, connectAuthEmulator as L, AuthCredential as M, EmailAuthCredential as N, OperationType as O, PhoneAuthProvider as P, OAuthCredential as Q, RecaptchaVerifier as R, SignInMethod as S, TotpMultiFactorGenerator as T, PhoneAuthCredential as U, inMemoryPersistence as V, EmailAuthProvider as W, FacebookAuthProvider as X, GoogleAuthProvider as Y, GithubAuthProvider as Z, OAuthProvider as _, browserCookiePersistence as a, TwitterAuthProvider as a0, signInAnonymously as a1, signInWithCredential as a2, linkWithCredential as a3, reauthenticateWithCredential as a4, signInWithCustomToken as a5, sendPasswordResetEmail as a6, confirmPasswordReset as a7, applyActionCode as a8, checkActionCode as a9, signInWithIdp as aA, _fail as aB, debugAssert as aC, _persistenceKeyName as aD, _serverAppCurrentUserOperationNotSupportedError as aE, _castAuth as aF, FederatedAuthProvider as aG, BaseOAuthProvider as aH, _emulatorUrl as aI, _performApiRequest as aJ, _isIOS as aK, _isAndroid as aL, _isIOS7Or8 as aM, _createError as aN, _isMobileBrowser as aO, _isIE10 as aP, UserImpl as aQ, AuthImpl as aR, _getClientVersion as aS, FetchProvider as aT, SAMLAuthCredential as aU, verifyPasswordResetCode as aa, createUserWithEmailAndPassword as ab, signInWithEmailAndPassword as ac, sendSignInLinkToEmail as ad, isSignInWithEmailLink as ae, signInWithEmailLink as af, fetchSignInMethodsForEmail as ag, sendEmailVerification as ah, verifyBeforeUpdateEmail as ai, ActionCodeURL as aj, parseActionCodeURL as ak, updateProfile as al, updateEmail as am, updatePassword as an, getIdToken as ao, getIdTokenResult as ap, unlink as aq, getAdditionalUserInfo as ar, reload as as, getMultiFactorResolver as at, multiFactor as au, _getInstance as av, _assert as aw, _signInWithCredential as ax, _reauthenticate as ay, _link as az, browserLocalPersistence as b, browserSessionPersistence as c, signInWithPopup as d, linkWithPopup as e, reauthenticateWithPopup as f, signInWithRedirect as g, linkWithRedirect as h, indexedDBLocalPersistence as i, reauthenticateWithRedirect as j, getRedirectResult as k, linkWithPhoneNumber as l, browserPopupRedirectResolver as m, PhoneMultiFactorGenerator as n, TotpSecret as o, getAuth as p, ProviderId as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, setPersistence as t, updatePhoneNumber as u, initializeRecaptchaConfig as v, validatePassword as w, onIdTokenChanged as x, beforeAuthStateChanged as y, onAuthStateChanged as z };
|
|
7580
|
-
//# sourceMappingURL=totp-
|
|
7614
|
+
//# sourceMappingURL=totp-2a4487f1.js.map
|