@firebase/auth 1.13.3 → 1.13.4-20260728185501
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-80e3689c.js → index-TiyvRZm6.js} +119 -26
- package/dist/browser-cjs/{index-80e3689c.js.map → index-TiyvRZm6.js.map} +1 -1
- package/dist/browser-cjs/index.js +1 -1
- package/dist/browser-cjs/internal.js +1 -1
- package/dist/browser-cjs/internal.js.map +1 -1
- package/dist/cordova/index.js +9 -3
- package/dist/cordova/index.js.map +1 -1
- package/dist/cordova/internal.js +3 -3
- package/dist/cordova/internal.js.map +1 -1
- package/dist/cordova/{popup_redirect-167cbb8f.js → popup_redirect-Be0Melsy.js} +148 -55
- package/dist/cordova/popup_redirect-Be0Melsy.js.map +1 -0
- package/dist/esm/{index-d90d2ee5.js → index-DqtyKhzu.js} +120 -27
- package/dist/esm/{index-d90d2ee5.js.map → index-DqtyKhzu.js.map} +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/internal.js +3 -3
- package/dist/esm/internal.js.map +1 -1
- package/dist/index.webworker.js +124 -70
- 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/internal.js.map +1 -1
- package/dist/node/{totp-9e84e53d.js → totp-D8cjDKiH.js} +30 -47
- package/dist/node/{totp-9e84e53d.js.map → totp-D8cjDKiH.js.map} +1 -1
- package/dist/node-esm/index.js +1 -1
- package/dist/node-esm/internal.js +3 -3
- package/dist/node-esm/internal.js.map +1 -1
- package/dist/node-esm/{totp-65577477.js → totp-BkwAJFrn.js} +31 -48
- package/dist/node-esm/{totp-65577477.js.map → totp-BkwAJFrn.js.map} +1 -1
- package/dist/rn/{index-7d302f10.js → index-BzcHGbdh.js} +24 -2
- package/dist/rn/{index-7d302f10.js.map → index-BzcHGbdh.js.map} +1 -1
- package/dist/rn/index.js +7 -1
- package/dist/rn/index.js.map +1 -1
- package/dist/rn/internal.js +96 -25
- package/dist/rn/internal.js.map +1 -1
- package/dist/web-extension-cjs/index.js +2 -1
- package/dist/web-extension-cjs/index.js.map +1 -1
- package/dist/web-extension-cjs/internal.js +1 -1
- package/dist/web-extension-cjs/internal.js.map +1 -1
- package/dist/web-extension-cjs/{register-1fdfc769.js → register-Bk5zU3vt.js} +119 -26
- package/dist/{web-extension-esm/register-293ebff1.js.map → web-extension-cjs/register-Bk5zU3vt.js.map} +1 -1
- package/dist/web-extension-esm/index.js +4 -3
- package/dist/web-extension-esm/index.js.map +1 -1
- package/dist/web-extension-esm/internal.js +3 -3
- package/dist/web-extension-esm/internal.js.map +1 -1
- package/dist/web-extension-esm/{register-293ebff1.js → register-CGKCII54.js} +120 -27
- package/dist/{web-extension-cjs/register-1fdfc769.js.map → web-extension-esm/register-CGKCII54.js.map} +1 -1
- package/package.json +13 -12
- package/dist/cordova/popup_redirect-167cbb8f.js.map +0 -1
|
@@ -1558,6 +1558,7 @@ function extractProviderData(providers) {
|
|
|
1558
1558
|
* See the License for the specific language governing permissions and
|
|
1559
1559
|
* limitations under the License.
|
|
1560
1560
|
*/
|
|
1561
|
+
/* eslint-disable camelcase */
|
|
1561
1562
|
async function requestStsToken(auth, refreshToken) {
|
|
1562
1563
|
const response = await _performFetchWithErrorHandling(auth, {}, async () => {
|
|
1563
1564
|
const body = querystring({
|
|
@@ -3287,6 +3288,22 @@ class MockGreCAPTCHA {
|
|
|
3287
3288
|
}
|
|
3288
3289
|
|
|
3289
3290
|
/* eslint-disable @typescript-eslint/no-require-imports */
|
|
3291
|
+
/**
|
|
3292
|
+
* @license
|
|
3293
|
+
* Copyright 2022 Google LLC
|
|
3294
|
+
*
|
|
3295
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
3296
|
+
* you may not use this file except in compliance with the License.
|
|
3297
|
+
* You may obtain a copy of the License at
|
|
3298
|
+
*
|
|
3299
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
3300
|
+
*
|
|
3301
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
3302
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
3303
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
3304
|
+
* See the License for the specific language governing permissions and
|
|
3305
|
+
* limitations under the License.
|
|
3306
|
+
*/
|
|
3290
3307
|
const RECAPTCHA_ENTERPRISE_VERIFIER_TYPE = 'recaptcha-enterprise';
|
|
3291
3308
|
const FAKE_TOKEN = 'NO_RECAPTCHA';
|
|
3292
3309
|
const RECAPTCHA_ENTERPRISE_ONLOAD_CALLBACK_NAME = 'onFirebaseAuthREInstanceReady';
|
|
@@ -3486,7 +3503,7 @@ async function injectRecaptchaFields(auth, request, action, isCaptchaResp = fals
|
|
|
3486
3503
|
return newRequest;
|
|
3487
3504
|
}
|
|
3488
3505
|
async function handleRecaptchaFlow(authInstance, request, actionName, actionMethod, recaptchaAuthProvider) {
|
|
3489
|
-
|
|
3506
|
+
{
|
|
3490
3507
|
if (authInstance
|
|
3491
3508
|
._getRecaptchaConfig()
|
|
3492
3509
|
?.isProviderEnabled("EMAIL_PASSWORD_PROVIDER" /* RecaptchaAuthProvider.EMAIL_PASSWORD_PROVIDER */)) {
|
|
@@ -3506,45 +3523,6 @@ async function handleRecaptchaFlow(authInstance, request, actionName, actionMeth
|
|
|
3506
3523
|
});
|
|
3507
3524
|
}
|
|
3508
3525
|
}
|
|
3509
|
-
else if (recaptchaAuthProvider === "PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */) {
|
|
3510
|
-
if (authInstance
|
|
3511
|
-
._getRecaptchaConfig()
|
|
3512
|
-
?.isProviderEnabled("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */)) {
|
|
3513
|
-
const requestWithRecaptcha = await injectRecaptchaFields(authInstance, request, actionName);
|
|
3514
|
-
return actionMethod(authInstance, requestWithRecaptcha).catch(async (error) => {
|
|
3515
|
-
if (authInstance
|
|
3516
|
-
._getRecaptchaConfig()
|
|
3517
|
-
?.getProviderEnforcementState("PHONE_PROVIDER" /* RecaptchaAuthProvider.PHONE_PROVIDER */) === "AUDIT" /* EnforcementState.AUDIT */) {
|
|
3518
|
-
// AUDIT mode
|
|
3519
|
-
if (error.code === `auth/${"missing-recaptcha-token" /* AuthErrorCode.MISSING_RECAPTCHA_TOKEN */}` ||
|
|
3520
|
-
error.code === `auth/${"invalid-app-credential" /* AuthErrorCode.INVALID_APP_CREDENTIAL */}`) {
|
|
3521
|
-
console.log(`Failed to verify with reCAPTCHA Enterprise. Automatically triggering the reCAPTCHA v2 flow to complete the ${actionName} flow.`);
|
|
3522
|
-
// reCAPTCHA Enterprise token is missing or reCAPTCHA Enterprise token
|
|
3523
|
-
// check fails.
|
|
3524
|
-
// Fallback to reCAPTCHA v2 flow.
|
|
3525
|
-
const requestWithRecaptchaFields = await injectRecaptchaFields(authInstance, request, actionName, false, // isCaptchaResp
|
|
3526
|
-
true // isFakeToken
|
|
3527
|
-
);
|
|
3528
|
-
// This will call the PhoneApiCaller to fetch and inject reCAPTCHA v2 token.
|
|
3529
|
-
return actionMethod(authInstance, requestWithRecaptchaFields);
|
|
3530
|
-
}
|
|
3531
|
-
}
|
|
3532
|
-
// ENFORCE mode or AUDIT mode with any other error.
|
|
3533
|
-
return Promise.reject(error);
|
|
3534
|
-
});
|
|
3535
|
-
}
|
|
3536
|
-
else {
|
|
3537
|
-
// Do reCAPTCHA v2 flow.
|
|
3538
|
-
const requestWithRecaptchaFields = await injectRecaptchaFields(authInstance, request, actionName, false, // isCaptchaResp
|
|
3539
|
-
true // isFakeToken
|
|
3540
|
-
);
|
|
3541
|
-
// This will call the PhoneApiCaller to fetch and inject v2 token.
|
|
3542
|
-
return actionMethod(authInstance, requestWithRecaptchaFields);
|
|
3543
|
-
}
|
|
3544
|
-
}
|
|
3545
|
-
else {
|
|
3546
|
-
return Promise.reject(recaptchaAuthProvider + ' provider is not supported.');
|
|
3547
|
-
}
|
|
3548
3526
|
}
|
|
3549
3527
|
async function _initializeRecaptchaConfig(auth) {
|
|
3550
3528
|
const authInternal = _castAuth(auth);
|
|
@@ -4003,7 +3981,7 @@ class EmailAuthCredential extends AuthCredential {
|
|
|
4003
3981
|
password: this._password,
|
|
4004
3982
|
clientType: "CLIENT_TYPE_WEB" /* RecaptchaClientType.WEB */
|
|
4005
3983
|
};
|
|
4006
|
-
return handleRecaptchaFlow(auth, request, "signInWithPassword" /* RecaptchaActionName.SIGN_IN_WITH_PASSWORD */, signInWithPassword
|
|
3984
|
+
return handleRecaptchaFlow(auth, request, "signInWithPassword" /* RecaptchaActionName.SIGN_IN_WITH_PASSWORD */, signInWithPassword);
|
|
4007
3985
|
case "emailLink" /* SignInMethod.EMAIL_LINK */:
|
|
4008
3986
|
return signInWithEmailLink$1(auth, {
|
|
4009
3987
|
email: this._email,
|
|
@@ -4024,7 +4002,7 @@ class EmailAuthCredential extends AuthCredential {
|
|
|
4024
4002
|
password: this._password,
|
|
4025
4003
|
clientType: "CLIENT_TYPE_WEB" /* RecaptchaClientType.WEB */
|
|
4026
4004
|
};
|
|
4027
|
-
return handleRecaptchaFlow(auth, request, "signUpPassword" /* RecaptchaActionName.SIGN_UP_PASSWORD */, linkEmailPassword
|
|
4005
|
+
return handleRecaptchaFlow(auth, request, "signUpPassword" /* RecaptchaActionName.SIGN_UP_PASSWORD */, linkEmailPassword);
|
|
4028
4006
|
case "emailLink" /* SignInMethod.EMAIL_LINK */:
|
|
4029
4007
|
return signInWithEmailLinkForLinking(auth, {
|
|
4030
4008
|
idToken,
|
|
@@ -5147,6 +5125,11 @@ GithubAuthProvider.PROVIDER_ID = "github.com" /* ProviderId.GITHUB */;
|
|
|
5147
5125
|
* See the License for the specific language governing permissions and
|
|
5148
5126
|
* limitations under the License.
|
|
5149
5127
|
*/
|
|
5128
|
+
/**
|
|
5129
|
+
* Represents the SAML credentials returned by an {@link SAMLAuthProvider}.
|
|
5130
|
+
*
|
|
5131
|
+
* @public
|
|
5132
|
+
*/
|
|
5150
5133
|
const IDP_REQUEST_URI = 'http://localhost';
|
|
5151
5134
|
/**
|
|
5152
5135
|
* @public
|
|
@@ -6025,7 +6008,7 @@ async function sendPasswordResetEmail(auth, email, actionCodeSettings) {
|
|
|
6025
6008
|
if (actionCodeSettings) {
|
|
6026
6009
|
_setActionCodeSettingsOnRequest(authInternal, request, actionCodeSettings);
|
|
6027
6010
|
}
|
|
6028
|
-
await handleRecaptchaFlow(authInternal, request, "getOobCode" /* RecaptchaActionName.GET_OOB_CODE */, sendPasswordResetEmail$1
|
|
6011
|
+
await handleRecaptchaFlow(authInternal, request, "getOobCode" /* RecaptchaActionName.GET_OOB_CODE */, sendPasswordResetEmail$1);
|
|
6029
6012
|
}
|
|
6030
6013
|
/**
|
|
6031
6014
|
* Completes the password reset process, given a confirmation code and new password.
|
|
@@ -6158,7 +6141,7 @@ async function createUserWithEmailAndPassword(auth, email, password) {
|
|
|
6158
6141
|
password,
|
|
6159
6142
|
clientType: "CLIENT_TYPE_WEB" /* RecaptchaClientType.WEB */
|
|
6160
6143
|
};
|
|
6161
|
-
const signUpResponse = handleRecaptchaFlow(authInternal, request, "signUpPassword" /* RecaptchaActionName.SIGN_UP_PASSWORD */, signUp
|
|
6144
|
+
const signUpResponse = handleRecaptchaFlow(authInternal, request, "signUpPassword" /* RecaptchaActionName.SIGN_UP_PASSWORD */, signUp);
|
|
6162
6145
|
const response = await signUpResponse.catch(error => {
|
|
6163
6146
|
if (error.code === `auth/${"password-does-not-meet-requirements" /* AuthErrorCode.PASSWORD_DOES_NOT_MEET_REQUIREMENTS */}`) {
|
|
6164
6147
|
void recachePasswordPolicy(auth);
|
|
@@ -6272,7 +6255,7 @@ async function sendSignInLinkToEmail(auth, email, actionCodeSettings) {
|
|
|
6272
6255
|
}
|
|
6273
6256
|
}
|
|
6274
6257
|
setActionCodeSettings(request, actionCodeSettings);
|
|
6275
|
-
await handleRecaptchaFlow(authInternal, request, "getOobCode" /* RecaptchaActionName.GET_OOB_CODE */, sendSignInLinkToEmail$1
|
|
6258
|
+
await handleRecaptchaFlow(authInternal, request, "getOobCode" /* RecaptchaActionName.GET_OOB_CODE */, sendSignInLinkToEmail$1);
|
|
6276
6259
|
}
|
|
6277
6260
|
/**
|
|
6278
6261
|
* Checks if an incoming link is a sign-in with email link suitable for {@link signInWithEmailLink}.
|
|
@@ -7201,7 +7184,7 @@ function multiFactor(user) {
|
|
|
7201
7184
|
}
|
|
7202
7185
|
|
|
7203
7186
|
var name = "@firebase/auth";
|
|
7204
|
-
var version = "1.13.
|
|
7187
|
+
var version = "1.13.4-20260728185501";
|
|
7205
7188
|
|
|
7206
7189
|
/**
|
|
7207
7190
|
* @license
|
|
@@ -7610,5 +7593,5 @@ function _isEmptyString(input) {
|
|
|
7610
7593
|
return typeof input === 'undefined' || input?.length === 0;
|
|
7611
7594
|
}
|
|
7612
7595
|
|
|
7613
|
-
export {
|
|
7614
|
-
//# sourceMappingURL=totp-
|
|
7596
|
+
export { onIdTokenChanged as $, ActionCodeOperation as A, fetchSignInMethodsForEmail as B, getAdditionalUserInfo as C, getAuth as D, EmailAuthCredential as E, FacebookAuthProvider as F, GithubAuthProvider as G, getIdToken as H, getIdTokenResult as I, getMultiFactorResolver as J, getRedirectResult as K, inMemoryPersistence as L, indexedDBLocalPersistence as M, initializeAuth as N, OAuthCredential as O, PhoneAuthCredential as P, initializeRecaptchaConfig as Q, RecaptchaVerifier as R, SAMLAuthProvider as S, TotpMultiFactorGenerator as T, isSignInWithEmailLink as U, linkWithCredential as V, linkWithPhoneNumber as W, linkWithPopup as X, linkWithRedirect as Y, multiFactor as Z, onAuthStateChanged as _, ActionCodeURL as a, parseActionCodeURL as a0, prodErrorMap as a1, reauthenticateWithCredential as a2, reauthenticateWithPhoneNumber as a3, reauthenticateWithPopup as a4, reauthenticateWithRedirect as a5, reload as a6, revokeAccessToken as a7, sendEmailVerification as a8, sendPasswordResetEmail 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, AuthImpl as aQ, FetchProvider as aR, SAMLAuthCredential as aS, UserImpl as aT, _getClientVersion as aU, sendSignInLinkToEmail as aa, setPersistence as ab, signInAnonymously as ac, signInWithCredential as ad, signInWithCustomToken as ae, signInWithEmailAndPassword as af, signInWithEmailLink as ag, signInWithPhoneNumber as ah, signInWithPopup as ai, signInWithRedirect as aj, signOut as ak, unlink as al, updateCurrentUser as am, updateEmail as an, updatePassword as ao, updatePhoneNumber as ap, updateProfile as aq, useDeviceLanguage as ar, validatePassword as as, verifyBeforeUpdateEmail as at, verifyPasswordResetCode as au, _getInstance as av, _assert as aw, _reauthenticate as ax, _link as ay, _signInWithCredential as az, AuthCredential as b, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as c, EmailAuthProvider as d, FactorId as e, GoogleAuthProvider as f, OAuthProvider as g, OperationType as h, PhoneAuthProvider as i, PhoneMultiFactorGenerator as j, ProviderId as k, SignInMethod as l, TotpSecret as m, TwitterAuthProvider as n, applyActionCode as o, beforeAuthStateChanged as p, browserCookiePersistence as q, browserLocalPersistence as r, browserPopupRedirectResolver as s, browserSessionPersistence as t, checkActionCode as u, confirmPasswordReset as v, connectAuthEmulator as w, createUserWithEmailAndPassword as x, debugErrorMap as y, deleteUser as z };
|
|
7597
|
+
//# sourceMappingURL=totp-BkwAJFrn.js.map
|