@firebase/auth 1.13.2 → 1.13.3-20260616165109
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-4f266ff1.js} +42 -8
- package/dist/browser-cjs/index-4f266ff1.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-517c6588.js} +43 -9
- package/dist/cordova/popup_redirect-517c6588.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-627e45d8.js} +43 -9
- package/dist/esm/index-627e45d8.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-65d9d0d1.js} +42 -8
- package/dist/node/totp-65d9d0d1.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-5eeabfcc.js} +43 -9
- package/dist/node-esm/totp-5eeabfcc.js.map +1 -0
- package/dist/rn/{index-d963ed8d.js → index-a0c71409.js} +42 -8
- package/dist/rn/index-a0c71409.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-6e59a8d4.js} +42 -8
- package/dist/web-extension-cjs/register-6e59a8d4.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-65800ac3.js} +43 -9
- package/dist/web-extension-esm/register-65800ac3.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/index.js
CHANGED
package/dist/node/internal.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var totp = require('./totp-
|
|
5
|
+
var totp = require('./totp-65d9d0d1.js');
|
|
6
6
|
var util = require('@firebase/util');
|
|
7
7
|
var app = require('@firebase/app');
|
|
8
8
|
require('@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>;
|
|
@@ -895,8 +895,8 @@ async function _performApiRequest(auth, method, path, request, customErrorMap =
|
|
|
895
895
|
}
|
|
896
896
|
}
|
|
897
897
|
const query = util.querystring({
|
|
898
|
-
|
|
899
|
-
|
|
898
|
+
...params,
|
|
899
|
+
key: auth.config.apiKey
|
|
900
900
|
}).slice(1);
|
|
901
901
|
const headers = await auth._getAdditionalHeaders();
|
|
902
902
|
headers["Content-Type" /* HttpHeader.CONTENT_TYPE */] = 'application/json';
|
|
@@ -913,7 +913,7 @@ async function _performApiRequest(auth, method, path, request, customErrorMap =
|
|
|
913
913
|
'RequestInitializerDict' is not implemented."
|
|
914
914
|
https://github.com/cloudflare/next-on-pages/issues/487 */
|
|
915
915
|
if (!util.isCloudflareWorker()) {
|
|
916
|
-
fetchArgs.referrerPolicy = '
|
|
916
|
+
fetchArgs.referrerPolicy = 'strict-origin-when-cross-origin';
|
|
917
917
|
}
|
|
918
918
|
if (auth.emulatorConfig && util.isCloudWorkstation(auth.emulatorConfig.host)) {
|
|
919
919
|
fetchArgs.credentials = 'include';
|
|
@@ -3291,6 +3291,7 @@ class MockGreCAPTCHA {
|
|
|
3291
3291
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
3292
3292
|
const RECAPTCHA_ENTERPRISE_VERIFIER_TYPE = 'recaptcha-enterprise';
|
|
3293
3293
|
const FAKE_TOKEN = 'NO_RECAPTCHA';
|
|
3294
|
+
const RECAPTCHA_ENTERPRISE_ONLOAD_CALLBACK_NAME = 'onFirebaseAuthREInstanceReady';
|
|
3294
3295
|
class RecaptchaEnterpriseVerifier {
|
|
3295
3296
|
/**
|
|
3296
3297
|
*
|
|
@@ -3370,8 +3371,13 @@ class RecaptchaEnterpriseVerifier {
|
|
|
3370
3371
|
}
|
|
3371
3372
|
return new Promise((resolve, reject) => {
|
|
3372
3373
|
retrieveSiteKey(this.auth)
|
|
3373
|
-
.then(siteKey => {
|
|
3374
|
-
if (!forceRefresh &&
|
|
3374
|
+
.then(async (siteKey) => {
|
|
3375
|
+
if (!forceRefresh &&
|
|
3376
|
+
isEnterprise(window.grecaptcha) &&
|
|
3377
|
+
// If download has already been initiated, do not trigger another
|
|
3378
|
+
// download, await the promise here.
|
|
3379
|
+
RecaptchaEnterpriseVerifier.scriptInjectionDeferred) {
|
|
3380
|
+
await RecaptchaEnterpriseVerifier.scriptInjectionDeferred.promise;
|
|
3375
3381
|
retrieveRecaptchaToken(siteKey, resolve, reject);
|
|
3376
3382
|
}
|
|
3377
3383
|
else {
|
|
@@ -3381,9 +3387,25 @@ class RecaptchaEnterpriseVerifier {
|
|
|
3381
3387
|
}
|
|
3382
3388
|
let url = _recaptchaEnterpriseScriptUrl();
|
|
3383
3389
|
if (url.length !== 0) {
|
|
3384
|
-
url +=
|
|
3390
|
+
url +=
|
|
3391
|
+
siteKey +
|
|
3392
|
+
`&onload=${RECAPTCHA_ENTERPRISE_ONLOAD_CALLBACK_NAME}`;
|
|
3385
3393
|
}
|
|
3394
|
+
// Existence of deferred indicates download has been initiated.
|
|
3395
|
+
RecaptchaEnterpriseVerifier.scriptInjectionDeferred =
|
|
3396
|
+
new util.Deferred();
|
|
3397
|
+
/**
|
|
3398
|
+
* Script attached to global window object that will be called
|
|
3399
|
+
* when the ReCAPTCHA Enterprise instance is ready.
|
|
3400
|
+
* grecaptcha.ready() is not reliable when there are multiple
|
|
3401
|
+
* scripts on the page, and script.onload only indicates the
|
|
3402
|
+
* script has downloaded, not that it has initialized.
|
|
3403
|
+
*/
|
|
3404
|
+
window[RECAPTCHA_ENTERPRISE_ONLOAD_CALLBACK_NAME] = () => {
|
|
3405
|
+
RecaptchaEnterpriseVerifier.scriptInjectionDeferred?.resolve();
|
|
3406
|
+
};
|
|
3386
3407
|
_loadJS(url)
|
|
3408
|
+
.then(() => RecaptchaEnterpriseVerifier.scriptInjectionDeferred?.promise)
|
|
3387
3409
|
.then(() => {
|
|
3388
3410
|
retrieveRecaptchaToken(siteKey, resolve, reject);
|
|
3389
3411
|
})
|
|
@@ -3398,6 +3420,18 @@ class RecaptchaEnterpriseVerifier {
|
|
|
3398
3420
|
});
|
|
3399
3421
|
}
|
|
3400
3422
|
}
|
|
3423
|
+
/**
|
|
3424
|
+
* Deferred that resolves when script tag has been injected onto the page
|
|
3425
|
+
* and the script is ready (grecaptcha.ready() and script.onload are not
|
|
3426
|
+
* reliable indicators, so this resolves when the global
|
|
3427
|
+
* `window[RECAPTCHA_ENTERPRISE_ONLOAD_CALLBACK_NAME]()` callback provided to the recaptcha url param "onload"
|
|
3428
|
+
* is triggered).
|
|
3429
|
+
* As a static variable this is applied to all instances of the class.
|
|
3430
|
+
* This will cause an error if users try to create multiple RecaptchaVerifiers
|
|
3431
|
+
* with different Recaptcha Enterprise sitekeys, which should be an
|
|
3432
|
+
* unuspported use case.
|
|
3433
|
+
*/
|
|
3434
|
+
RecaptchaEnterpriseVerifier.scriptInjectionDeferred = null;
|
|
3401
3435
|
async function injectRecaptchaFields(auth, request, action, isCaptchaResp = false, isFakeToken = false) {
|
|
3402
3436
|
const verifier = new RecaptchaEnterpriseVerifier(auth);
|
|
3403
3437
|
let captchaResponse;
|
|
@@ -7169,7 +7203,7 @@ function multiFactor(user) {
|
|
|
7169
7203
|
}
|
|
7170
7204
|
|
|
7171
7205
|
var name = "@firebase/auth";
|
|
7172
|
-
var version = "1.13.
|
|
7206
|
+
var version = "1.13.3-20260616165109";
|
|
7173
7207
|
|
|
7174
7208
|
/**
|
|
7175
7209
|
* @license
|
|
@@ -7689,4 +7723,4 @@ exports.useDeviceLanguage = useDeviceLanguage;
|
|
|
7689
7723
|
exports.validatePassword = validatePassword;
|
|
7690
7724
|
exports.verifyBeforeUpdateEmail = verifyBeforeUpdateEmail;
|
|
7691
7725
|
exports.verifyPasswordResetCode = verifyPasswordResetCode;
|
|
7692
|
-
//# sourceMappingURL=totp-
|
|
7726
|
+
//# sourceMappingURL=totp-65d9d0d1.js.map
|