@firebase/auth 1.4.0-canary.bebecdaad → 1.4.0-canary.e9ff107ee
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/auth-public.d.ts +14 -2
- package/dist/auth.d.ts +15 -3
- package/dist/browser-cjs/{index-278c561b.js → index-f3093184.js} +23 -8
- package/dist/browser-cjs/index-f3093184.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/api/errors.d.ts +1 -0
- package/dist/browser-cjs/src/core/errors.d.ts +2 -1
- package/dist/browser-cjs/src/core/strategies/email.d.ts +5 -1
- package/dist/browser-cjs/src/core/strategies/email_and_password.d.ts +5 -1
- package/dist/browser-cjs/src/core/user/account_info.d.ts +3 -0
- package/dist/cordova/index.js +2 -2
- package/dist/cordova/internal.js +2 -2
- package/dist/cordova/{popup_redirect-d8c8d0e5.js → popup_redirect-755b181a.js} +23 -8
- package/dist/cordova/popup_redirect-755b181a.js.map +1 -0
- package/dist/cordova/src/api/errors.d.ts +1 -0
- package/dist/cordova/src/core/errors.d.ts +2 -1
- package/dist/cordova/src/core/strategies/email.d.ts +5 -1
- package/dist/cordova/src/core/strategies/email_and_password.d.ts +5 -1
- package/dist/cordova/src/core/user/account_info.d.ts +3 -0
- package/dist/esm2017/{index-9c00472c.js → index-bd1912a6.js} +23 -8
- package/dist/esm2017/index-bd1912a6.js.map +1 -0
- package/dist/esm2017/index.js +1 -1
- package/dist/esm2017/internal.js +2 -2
- package/dist/esm2017/src/api/errors.d.ts +1 -0
- package/dist/esm2017/src/core/errors.d.ts +2 -1
- package/dist/esm2017/src/core/strategies/email.d.ts +5 -1
- package/dist/esm2017/src/core/strategies/email_and_password.d.ts +5 -1
- package/dist/esm2017/src/core/user/account_info.d.ts +3 -0
- package/dist/esm5/{index-e4687279.js → index-bc962262.js} +23 -8
- package/dist/esm5/index-bc962262.js.map +1 -0
- package/dist/esm5/index.js +1 -1
- package/dist/esm5/internal.js +2 -2
- package/dist/esm5/src/api/errors.d.ts +1 -0
- package/dist/esm5/src/core/errors.d.ts +2 -1
- package/dist/esm5/src/core/strategies/email.d.ts +5 -1
- package/dist/esm5/src/core/strategies/email_and_password.d.ts +5 -1
- package/dist/esm5/src/core/user/account_info.d.ts +3 -0
- package/dist/index.webworker.esm5.js +22 -7
- package/dist/index.webworker.esm5.js.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/internal.js +1 -1
- package/dist/node/src/api/errors.d.ts +1 -0
- package/dist/node/src/core/errors.d.ts +2 -1
- package/dist/node/src/core/strategies/email.d.ts +5 -1
- package/dist/node/src/core/strategies/email_and_password.d.ts +5 -1
- package/dist/node/src/core/user/account_info.d.ts +3 -0
- package/dist/node/{totp-5ced24ca.js → totp-839b7df8.js} +23 -8
- package/dist/node/totp-839b7df8.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/api/errors.d.ts +1 -0
- package/dist/node-esm/src/core/errors.d.ts +2 -1
- package/dist/node-esm/src/core/strategies/email.d.ts +5 -1
- package/dist/node-esm/src/core/strategies/email_and_password.d.ts +5 -1
- package/dist/node-esm/src/core/user/account_info.d.ts +3 -0
- package/dist/node-esm/{totp-6036dc39.js → totp-44c65e73.js} +23 -8
- package/dist/node-esm/totp-44c65e73.js.map +1 -0
- package/dist/rn/{index-1130bbdb.js → index-2b10254c.js} +23 -8
- package/dist/rn/index-2b10254c.js.map +1 -0
- package/dist/rn/index.js +1 -1
- package/dist/rn/internal.js +1 -1
- package/dist/rn/src/api/errors.d.ts +1 -0
- package/dist/rn/src/core/errors.d.ts +2 -1
- package/dist/rn/src/core/strategies/email.d.ts +5 -1
- package/dist/rn/src/core/strategies/email_and_password.d.ts +5 -1
- package/dist/rn/src/core/user/account_info.d.ts +3 -0
- package/dist/src/api/errors.d.ts +1 -0
- package/dist/src/core/errors.d.ts +2 -1
- package/dist/src/core/strategies/email.d.ts +5 -1
- package/dist/src/core/strategies/email_and_password.d.ts +5 -1
- package/dist/src/core/user/account_info.d.ts +3 -0
- package/package.json +6 -6
- package/dist/browser-cjs/index-278c561b.js.map +0 -1
- package/dist/cordova/popup_redirect-d8c8d0e5.js.map +0 -1
- package/dist/esm2017/index-9c00472c.js.map +0 -1
- package/dist/esm5/index-e4687279.js.map +0 -1
- package/dist/node/totp-5ced24ca.js.map +0 -1
- package/dist/node-esm/totp-6036dc39.js.map +0 -1
- package/dist/rn/index-1130bbdb.js.map +0 -1
|
@@ -42,6 +42,7 @@ export declare const enum ServerError {
|
|
|
42
42
|
INVALID_ID_TOKEN = "INVALID_ID_TOKEN",
|
|
43
43
|
INVALID_IDP_RESPONSE = "INVALID_IDP_RESPONSE",
|
|
44
44
|
INVALID_IDENTIFIER = "INVALID_IDENTIFIER",
|
|
45
|
+
INVALID_LOGIN_CREDENTIALS = "INVALID_LOGIN_CREDENTIALS",
|
|
45
46
|
INVALID_MESSAGE_PAYLOAD = "INVALID_MESSAGE_PAYLOAD",
|
|
46
47
|
INVALID_MFA_PENDING_CREDENTIAL = "INVALID_MFA_PENDING_CREDENTIAL",
|
|
47
48
|
INVALID_OAUTH_CLIENT_ID = "INVALID_OAUTH_CLIENT_ID",
|
|
@@ -57,7 +57,7 @@ export declare const enum AuthErrorCode {
|
|
|
57
57
|
INVALID_DYNAMIC_LINK_DOMAIN = "invalid-dynamic-link-domain",
|
|
58
58
|
INVALID_EMAIL = "invalid-email",
|
|
59
59
|
INVALID_EMULATOR_SCHEME = "invalid-emulator-scheme",
|
|
60
|
-
|
|
60
|
+
INVALID_CREDENTIAL = "invalid-credential",
|
|
61
61
|
INVALID_MESSAGE_PAYLOAD = "invalid-message-payload",
|
|
62
62
|
INVALID_MFA_SESSION = "invalid-multi-factor-session",
|
|
63
63
|
INVALID_OAUTH_CLIENT_ID = "invalid-oauth-client-id",
|
|
@@ -250,6 +250,7 @@ export declare const AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY: {
|
|
|
250
250
|
readonly INVALID_EMAIL: "auth/invalid-email";
|
|
251
251
|
readonly INVALID_EMULATOR_SCHEME: "auth/invalid-emulator-scheme";
|
|
252
252
|
readonly INVALID_IDP_RESPONSE: "auth/invalid-credential";
|
|
253
|
+
readonly INVALID_LOGIN_CREDENTIALS: "auth/invalid-credential";
|
|
253
254
|
readonly INVALID_MESSAGE_PAYLOAD: "auth/invalid-message-payload";
|
|
254
255
|
readonly INVALID_MFA_SESSION: "auth/invalid-multi-factor-session";
|
|
255
256
|
readonly INVALID_OAUTH_CLIENT_ID: "auth/invalid-oauth-client-id";
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { ActionCodeSettings, Auth, User } from '../../model/public_types';
|
|
18
18
|
/**
|
|
19
|
-
* Gets the list of possible sign in methods for the given email address.
|
|
19
|
+
* Gets the list of possible sign in methods for the given email address. This method returns an
|
|
20
|
+
* empty list when [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled, irrespective of the number of
|
|
21
|
+
* authentication methods available for the given email.
|
|
20
22
|
*
|
|
21
23
|
* @remarks
|
|
22
24
|
* This is useful to differentiate methods of sign-in for the same provider, eg.
|
|
@@ -27,6 +29,8 @@ import { ActionCodeSettings, Auth, User } from '../../model/public_types';
|
|
|
27
29
|
* @param auth - The {@link Auth} instance.
|
|
28
30
|
* @param email - The user's email address.
|
|
29
31
|
*
|
|
32
|
+
* Deprecated. Migrating off of this method is recommended as a security best-practice.
|
|
33
|
+
* Learn more in the Identity Platform documentation for [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection).
|
|
30
34
|
* @public
|
|
31
35
|
*/
|
|
32
36
|
export declare function fetchSignInMethodsForEmail(auth: Auth, email: string): Promise<string[]>;
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
*/
|
|
17
17
|
import { ActionCodeInfo, ActionCodeSettings, Auth, UserCredential } from '../../model/public_types';
|
|
18
18
|
/**
|
|
19
|
-
* Sends a password reset email to the given email address.
|
|
19
|
+
* Sends a password reset email to the given email address. This method does not throw an error when
|
|
20
|
+
* there's no user account with the given email address and
|
|
21
|
+
* [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled.
|
|
20
22
|
*
|
|
21
23
|
* @remarks
|
|
22
24
|
* To complete the password reset, call {@link confirmPasswordReset} with the code supplied in
|
|
@@ -112,6 +114,8 @@ export declare function createUserWithEmailAndPassword(auth: Auth, email: string
|
|
|
112
114
|
*
|
|
113
115
|
* @remarks
|
|
114
116
|
* Fails with an error if the email address and password do not match.
|
|
117
|
+
* When [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled,
|
|
118
|
+
* this method fails with "auth/invalid-credential" in case of an invalid email/password.
|
|
115
119
|
*
|
|
116
120
|
* Note: The user's password is NOT the password used to access the user's email account. The
|
|
117
121
|
* email address serves as a unique identifier for the user, and the password is used to access
|
|
@@ -41,6 +41,9 @@ export declare function updateProfile(user: User, { displayName, photoURL: photo
|
|
|
41
41
|
* @param user - The user.
|
|
42
42
|
* @param newEmail - The new email address.
|
|
43
43
|
*
|
|
44
|
+
* Throws "auth/operation-not-allowed" error when [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled.
|
|
45
|
+
* Deprecated - Use {@link verifyBeforeUpdateEmail} instead.
|
|
46
|
+
*
|
|
44
47
|
* @public
|
|
45
48
|
*/
|
|
46
49
|
export declare function updateEmail(user: User, newEmail: string): Promise<void>;
|
package/dist/cordova/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getApp, _getProvider } from '@firebase/app';
|
|
2
|
-
import { _ as _signInWithRedirect, a as _reauthenticateWithRedirect, b as _linkWithRedirect, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, d as cordovaPopupRedirectResolver } from './popup_redirect-
|
|
3
|
-
export { A as ActionCodeOperation, a6 as ActionCodeURL, y as AuthCredential, w as AuthErrorCodes, E as EmailAuthCredential, D as EmailAuthProvider, G as FacebookAuthProvider, F as FactorId, I as GithubAuthProvider, H as GoogleAuthProvider, z as OAuthCredential, J as OAuthProvider, O as OperationType, B as PhoneAuthCredential, P as ProviderId, K as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, W as applyActionCode, j as beforeAuthStateChanged, e as browserLocalPersistence, f as browserSessionPersistence, X as checkActionCode, V as confirmPasswordReset, x as connectAuthEmulator, d as cordovaPopupRedirectResolver, Z as createUserWithEmailAndPassword, q as debugErrorMap, p as deleteUser, a3 as fetchSignInMethodsForEmail, ae as getAdditionalUserInfo, ab as getIdToken, ac as getIdTokenResult, ag as getMultiFactorResolver, g as getRedirectResult, C as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, h as initializeRecaptchaConfig, a1 as isSignInWithEmailLink, N as linkWithCredential, ah as multiFactor, k as onAuthStateChanged, o as onIdTokenChanged, a7 as parseActionCodeURL, t as prodErrorMap, Q as reauthenticateWithCredential, af as reload, n as revokeAccessToken, a4 as sendEmailVerification, U as sendPasswordResetEmail, a0 as sendSignInLinkToEmail, s as setPersistence, L as signInAnonymously, M as signInWithCredential, R as signInWithCustomToken, $ as signInWithEmailAndPassword, a2 as signInWithEmailLink, m as signOut, ad as unlink, l as updateCurrentUser, a9 as updateEmail, aa as updatePassword, a8 as updateProfile, u as useDeviceLanguage, v as validatePassword, a5 as verifyBeforeUpdateEmail, Y as verifyPasswordResetCode } from './popup_redirect-
|
|
2
|
+
import { _ as _signInWithRedirect, a as _reauthenticateWithRedirect, b as _linkWithRedirect, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, d as cordovaPopupRedirectResolver } from './popup_redirect-755b181a.js';
|
|
3
|
+
export { A as ActionCodeOperation, a6 as ActionCodeURL, y as AuthCredential, w as AuthErrorCodes, E as EmailAuthCredential, D as EmailAuthProvider, G as FacebookAuthProvider, F as FactorId, I as GithubAuthProvider, H as GoogleAuthProvider, z as OAuthCredential, J as OAuthProvider, O as OperationType, B as PhoneAuthCredential, P as ProviderId, K as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, W as applyActionCode, j as beforeAuthStateChanged, e as browserLocalPersistence, f as browserSessionPersistence, X as checkActionCode, V as confirmPasswordReset, x as connectAuthEmulator, d as cordovaPopupRedirectResolver, Z as createUserWithEmailAndPassword, q as debugErrorMap, p as deleteUser, a3 as fetchSignInMethodsForEmail, ae as getAdditionalUserInfo, ab as getIdToken, ac as getIdTokenResult, ag as getMultiFactorResolver, g as getRedirectResult, C as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, h as initializeRecaptchaConfig, a1 as isSignInWithEmailLink, N as linkWithCredential, ah as multiFactor, k as onAuthStateChanged, o as onIdTokenChanged, a7 as parseActionCodeURL, t as prodErrorMap, Q as reauthenticateWithCredential, af as reload, n as revokeAccessToken, a4 as sendEmailVerification, U as sendPasswordResetEmail, a0 as sendSignInLinkToEmail, s as setPersistence, L as signInAnonymously, M as signInWithCredential, R as signInWithCustomToken, $ as signInWithEmailAndPassword, a2 as signInWithEmailLink, m as signOut, ad as unlink, l as updateCurrentUser, a9 as updateEmail, aa as updatePassword, a8 as updateProfile, u as useDeviceLanguage, v as validatePassword, a5 as verifyBeforeUpdateEmail, Y as verifyPasswordResetCode } from './popup_redirect-755b181a.js';
|
|
4
4
|
import 'tslib';
|
|
5
5
|
import '@firebase/util';
|
|
6
6
|
import '@firebase/component';
|
package/dist/cordova/internal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ai as _performApiRequest, aj as _addTidIfNecessary, ak as _assert, al as Delay, am as _window, an as isV2, ao as _createError, ap as _loadJS, aq as _generateCallbackName, ar as getRecaptchaParams, as as _isHttpOrHttps, at as _isWorker, au as _castAuth, M as signInWithCredential, N as linkWithCredential, av as _assertLinkedStatus, Q as reauthenticateWithCredential, aw as sendPhoneVerificationCode, ax as startEnrollPhoneMfa, ay as _link, B as PhoneAuthCredential, az as debugAssert, aA as _generateEventId, aB as AbstractPopupRedirectOperation, aC as _assertInstanceOf, aD as _withDefaultResolver, aE as FederatedAuthProvider, aF as _fail, aG as _getProjectConfig, aH as _getCurrentUrl, aI as _emulatorUrl, aJ as _isChromeIOS, aK as _isFirefox, aL as _isIOSStandalone, aM as _getRedirectUrl, aN as _setWindowLocation, aO as _isMobileBrowser, aP as _isSafari, aQ as _isIOS, f as browserSessionPersistence, aR as _getRedirectResult, aS as _overrideRedirectResult, aT as AuthEventManager, aU as debugFail, aV as finalizeEnrollPhoneMfa, aW as finalizeEnrollTotpMfa, aX as startEnrollTotpMfa, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, e as browserLocalPersistence, j as beforeAuthStateChanged, o as onIdTokenChanged, x as connectAuthEmulator } from './popup_redirect-
|
|
2
|
-
export { A as ActionCodeOperation, a6 as ActionCodeURL, y as AuthCredential, w as AuthErrorCodes, a$ as AuthImpl, E as EmailAuthCredential, D as EmailAuthProvider, G as FacebookAuthProvider, F as FactorId, b1 as FetchProvider, I as GithubAuthProvider, H as GoogleAuthProvider, z as OAuthCredential, J as OAuthProvider, O as OperationType, B as PhoneAuthCredential, P as ProviderId, b2 as SAMLAuthCredential, K as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, aZ as UserImpl, ak as _assert, au as _castAuth, aF as _fail, aA as _generateEventId, b0 as _getClientVersion, a_ as _getInstance, aR as _getRedirectResult, aS as _overrideRedirectResult, aY as _persistenceKeyName, W as applyActionCode, j as beforeAuthStateChanged, e as browserLocalPersistence, f as browserSessionPersistence, X as checkActionCode, V as confirmPasswordReset, x as connectAuthEmulator, d as cordovaPopupRedirectResolver, Z as createUserWithEmailAndPassword, q as debugErrorMap, p as deleteUser, a3 as fetchSignInMethodsForEmail, ae as getAdditionalUserInfo, ab as getIdToken, ac as getIdTokenResult, ag as getMultiFactorResolver, g as getRedirectResult, C as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, h as initializeRecaptchaConfig, a1 as isSignInWithEmailLink, N as linkWithCredential, b4 as linkWithRedirect, ah as multiFactor, k as onAuthStateChanged, o as onIdTokenChanged, a7 as parseActionCodeURL, t as prodErrorMap, Q as reauthenticateWithCredential, b5 as reauthenticateWithRedirect, af as reload, n as revokeAccessToken, a4 as sendEmailVerification, U as sendPasswordResetEmail, a0 as sendSignInLinkToEmail, s as setPersistence, L as signInAnonymously, M as signInWithCredential, R as signInWithCustomToken, $ as signInWithEmailAndPassword, a2 as signInWithEmailLink, b3 as signInWithRedirect, m as signOut, ad as unlink, l as updateCurrentUser, a9 as updateEmail, aa as updatePassword, a8 as updateProfile, u as useDeviceLanguage, v as validatePassword, a5 as verifyBeforeUpdateEmail, Y as verifyPasswordResetCode } from './popup_redirect-
|
|
1
|
+
import { ai as _performApiRequest, aj as _addTidIfNecessary, ak as _assert, al as Delay, am as _window, an as isV2, ao as _createError, ap as _loadJS, aq as _generateCallbackName, ar as getRecaptchaParams, as as _isHttpOrHttps, at as _isWorker, au as _castAuth, M as signInWithCredential, N as linkWithCredential, av as _assertLinkedStatus, Q as reauthenticateWithCredential, aw as sendPhoneVerificationCode, ax as startEnrollPhoneMfa, ay as _link, B as PhoneAuthCredential, az as debugAssert, aA as _generateEventId, aB as AbstractPopupRedirectOperation, aC as _assertInstanceOf, aD as _withDefaultResolver, aE as FederatedAuthProvider, aF as _fail, aG as _getProjectConfig, aH as _getCurrentUrl, aI as _emulatorUrl, aJ as _isChromeIOS, aK as _isFirefox, aL as _isIOSStandalone, aM as _getRedirectUrl, aN as _setWindowLocation, aO as _isMobileBrowser, aP as _isSafari, aQ as _isIOS, f as browserSessionPersistence, aR as _getRedirectResult, aS as _overrideRedirectResult, aT as AuthEventManager, aU as debugFail, aV as finalizeEnrollPhoneMfa, aW as finalizeEnrollTotpMfa, aX as startEnrollTotpMfa, r as registerAuth, i as initializeAuth, c as indexedDBLocalPersistence, e as browserLocalPersistence, j as beforeAuthStateChanged, o as onIdTokenChanged, x as connectAuthEmulator } from './popup_redirect-755b181a.js';
|
|
2
|
+
export { A as ActionCodeOperation, a6 as ActionCodeURL, y as AuthCredential, w as AuthErrorCodes, a$ as AuthImpl, E as EmailAuthCredential, D as EmailAuthProvider, G as FacebookAuthProvider, F as FactorId, b1 as FetchProvider, I as GithubAuthProvider, H as GoogleAuthProvider, z as OAuthCredential, J as OAuthProvider, O as OperationType, B as PhoneAuthCredential, P as ProviderId, b2 as SAMLAuthCredential, K as SAMLAuthProvider, S as SignInMethod, T as TwitterAuthProvider, aZ as UserImpl, ak as _assert, au as _castAuth, aF as _fail, aA as _generateEventId, b0 as _getClientVersion, a_ as _getInstance, aR as _getRedirectResult, aS as _overrideRedirectResult, aY as _persistenceKeyName, W as applyActionCode, j as beforeAuthStateChanged, e as browserLocalPersistence, f as browserSessionPersistence, X as checkActionCode, V as confirmPasswordReset, x as connectAuthEmulator, d as cordovaPopupRedirectResolver, Z as createUserWithEmailAndPassword, q as debugErrorMap, p as deleteUser, a3 as fetchSignInMethodsForEmail, ae as getAdditionalUserInfo, ab as getIdToken, ac as getIdTokenResult, ag as getMultiFactorResolver, g as getRedirectResult, C as inMemoryPersistence, c as indexedDBLocalPersistence, i as initializeAuth, h as initializeRecaptchaConfig, a1 as isSignInWithEmailLink, N as linkWithCredential, b4 as linkWithRedirect, ah as multiFactor, k as onAuthStateChanged, o as onIdTokenChanged, a7 as parseActionCodeURL, t as prodErrorMap, Q as reauthenticateWithCredential, b5 as reauthenticateWithRedirect, af as reload, n as revokeAccessToken, a4 as sendEmailVerification, U as sendPasswordResetEmail, a0 as sendSignInLinkToEmail, s as setPersistence, L as signInAnonymously, M as signInWithCredential, R as signInWithCustomToken, $ as signInWithEmailAndPassword, a2 as signInWithEmailLink, b3 as signInWithRedirect, m as signOut, ad as unlink, l as updateCurrentUser, a9 as updateEmail, aa as updatePassword, a8 as updateProfile, u as useDeviceLanguage, v as validatePassword, a5 as verifyBeforeUpdateEmail, Y as verifyPasswordResetCode } from './popup_redirect-755b181a.js';
|
|
3
3
|
import { __awaiter, __generator, __assign, __extends, __spreadArray } from 'tslib';
|
|
4
4
|
import { querystring, getModularInstance, getUA, getExperimentalSetting, getDefaultEmulatorHost } from '@firebase/util';
|
|
5
5
|
import { SDK_VERSION, getApp, _getProvider } from '@firebase/app';
|
|
@@ -990,7 +990,7 @@ function _debugErrorMap() {
|
|
|
990
990
|
_a["invalid-emulator-scheme" /* AuthErrorCode.INVALID_EMULATOR_SCHEME */] = 'Emulator URL must start with a valid scheme (http:// or https://).',
|
|
991
991
|
_a["invalid-api-key" /* AuthErrorCode.INVALID_API_KEY */] = 'Your API key is invalid, please check you have copied it correctly.',
|
|
992
992
|
_a["invalid-cert-hash" /* AuthErrorCode.INVALID_CERT_HASH */] = 'The SHA-1 certificate hash provided is invalid.',
|
|
993
|
-
_a["invalid-credential" /* AuthErrorCode.
|
|
993
|
+
_a["invalid-credential" /* AuthErrorCode.INVALID_CREDENTIAL */] = 'The supplied auth credential is incorrect, malformed or has expired.',
|
|
994
994
|
_a["invalid-message-payload" /* AuthErrorCode.INVALID_MESSAGE_PAYLOAD */] = 'The email template corresponding to this action contains invalid characters in its message. ' +
|
|
995
995
|
'Please fix by going to the Auth email templates section in the Firebase Console.',
|
|
996
996
|
_a["invalid-multi-factor-session" /* AuthErrorCode.INVALID_MFA_SESSION */] = 'The request does not contain a valid proof of first factor successful sign-in.',
|
|
@@ -1167,6 +1167,7 @@ var AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY = {
|
|
|
1167
1167
|
INVALID_EMAIL: 'auth/invalid-email',
|
|
1168
1168
|
INVALID_EMULATOR_SCHEME: 'auth/invalid-emulator-scheme',
|
|
1169
1169
|
INVALID_IDP_RESPONSE: 'auth/invalid-credential',
|
|
1170
|
+
INVALID_LOGIN_CREDENTIALS: 'auth/invalid-credential',
|
|
1170
1171
|
INVALID_MESSAGE_PAYLOAD: 'auth/invalid-message-payload',
|
|
1171
1172
|
INVALID_MFA_SESSION: 'auth/invalid-multi-factor-session',
|
|
1172
1173
|
INVALID_OAUTH_CLIENT_ID: 'auth/invalid-oauth-client-id',
|
|
@@ -1632,12 +1633,15 @@ var SERVER_ERROR_MAP = (_a$1 = {},
|
|
|
1632
1633
|
_a$1["INVALID_PASSWORD" /* ServerError.INVALID_PASSWORD */] = "wrong-password" /* AuthErrorCode.INVALID_PASSWORD */,
|
|
1633
1634
|
// This can only happen if the SDK sends a bad request.
|
|
1634
1635
|
_a$1["MISSING_PASSWORD" /* ServerError.MISSING_PASSWORD */] = "missing-password" /* AuthErrorCode.MISSING_PASSWORD */,
|
|
1636
|
+
// Thrown if Email Enumeration Protection is enabled in the project and the email or password is
|
|
1637
|
+
// invalid.
|
|
1638
|
+
_a$1["INVALID_LOGIN_CREDENTIALS" /* ServerError.INVALID_LOGIN_CREDENTIALS */] = "invalid-credential" /* AuthErrorCode.INVALID_CREDENTIAL */,
|
|
1635
1639
|
// Sign up with email and password errors.
|
|
1636
1640
|
_a$1["EMAIL_EXISTS" /* ServerError.EMAIL_EXISTS */] = "email-already-in-use" /* AuthErrorCode.EMAIL_EXISTS */,
|
|
1637
1641
|
_a$1["PASSWORD_LOGIN_DISABLED" /* ServerError.PASSWORD_LOGIN_DISABLED */] = "operation-not-allowed" /* AuthErrorCode.OPERATION_NOT_ALLOWED */,
|
|
1638
1642
|
// Verify assertion for sign in with credential errors:
|
|
1639
|
-
_a$1["INVALID_IDP_RESPONSE" /* ServerError.INVALID_IDP_RESPONSE */] = "invalid-credential" /* AuthErrorCode.
|
|
1640
|
-
_a$1["INVALID_PENDING_TOKEN" /* ServerError.INVALID_PENDING_TOKEN */] = "invalid-credential" /* AuthErrorCode.
|
|
1643
|
+
_a$1["INVALID_IDP_RESPONSE" /* ServerError.INVALID_IDP_RESPONSE */] = "invalid-credential" /* AuthErrorCode.INVALID_CREDENTIAL */,
|
|
1644
|
+
_a$1["INVALID_PENDING_TOKEN" /* ServerError.INVALID_PENDING_TOKEN */] = "invalid-credential" /* AuthErrorCode.INVALID_CREDENTIAL */,
|
|
1641
1645
|
_a$1["FEDERATED_USER_ID_ALREADY_LINKED" /* ServerError.FEDERATED_USER_ID_ALREADY_LINKED */] = "credential-already-in-use" /* AuthErrorCode.CREDENTIAL_ALREADY_IN_USE */,
|
|
1642
1646
|
// This can only happen if the SDK sends a bad request.
|
|
1643
1647
|
_a$1["MISSING_REQ_TYPE" /* ServerError.MISSING_REQ_TYPE */] = "internal-error" /* AuthErrorCode.INTERNAL_ERROR */,
|
|
@@ -1659,7 +1663,7 @@ var SERVER_ERROR_MAP = (_a$1 = {},
|
|
|
1659
1663
|
// Phone Auth related errors.
|
|
1660
1664
|
_a$1["INVALID_CODE" /* ServerError.INVALID_CODE */] = "invalid-verification-code" /* AuthErrorCode.INVALID_CODE */,
|
|
1661
1665
|
_a$1["INVALID_SESSION_INFO" /* ServerError.INVALID_SESSION_INFO */] = "invalid-verification-id" /* AuthErrorCode.INVALID_SESSION_INFO */,
|
|
1662
|
-
_a$1["INVALID_TEMPORARY_PROOF" /* ServerError.INVALID_TEMPORARY_PROOF */] = "invalid-credential" /* AuthErrorCode.
|
|
1666
|
+
_a$1["INVALID_TEMPORARY_PROOF" /* ServerError.INVALID_TEMPORARY_PROOF */] = "invalid-credential" /* AuthErrorCode.INVALID_CREDENTIAL */,
|
|
1663
1667
|
_a$1["MISSING_SESSION_INFO" /* ServerError.MISSING_SESSION_INFO */] = "missing-verification-id" /* AuthErrorCode.MISSING_SESSION_INFO */,
|
|
1664
1668
|
_a$1["SESSION_EXPIRED" /* ServerError.SESSION_EXPIRED */] = "code-expired" /* AuthErrorCode.CODE_EXPIRED */,
|
|
1665
1669
|
// Other action code errors when additional settings passed.
|
|
@@ -7424,7 +7428,9 @@ function recachePasswordPolicy(auth) {
|
|
|
7424
7428
|
});
|
|
7425
7429
|
}
|
|
7426
7430
|
/**
|
|
7427
|
-
* Sends a password reset email to the given email address.
|
|
7431
|
+
* Sends a password reset email to the given email address. This method does not throw an error when
|
|
7432
|
+
* there's no user account with the given email address and
|
|
7433
|
+
* [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled.
|
|
7428
7434
|
*
|
|
7429
7435
|
* @remarks
|
|
7430
7436
|
* To complete the password reset, call {@link confirmPasswordReset} with the code supplied in
|
|
@@ -7665,6 +7671,8 @@ function createUserWithEmailAndPassword(auth, email, password) {
|
|
|
7665
7671
|
*
|
|
7666
7672
|
* @remarks
|
|
7667
7673
|
* Fails with an error if the email address and password do not match.
|
|
7674
|
+
* When [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled,
|
|
7675
|
+
* this method fails with "auth/invalid-credential" in case of an invalid email/password.
|
|
7668
7676
|
*
|
|
7669
7677
|
* Note: The user's password is NOT the password used to access the user's email account. The
|
|
7670
7678
|
* email address serves as a unique identifier for the user, and the password is used to access
|
|
@@ -7873,7 +7881,9 @@ function createAuthUri(auth, request) {
|
|
|
7873
7881
|
* limitations under the License.
|
|
7874
7882
|
*/
|
|
7875
7883
|
/**
|
|
7876
|
-
* Gets the list of possible sign in methods for the given email address.
|
|
7884
|
+
* Gets the list of possible sign in methods for the given email address. This method returns an
|
|
7885
|
+
* empty list when [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled, irrespective of the number of
|
|
7886
|
+
* authentication methods available for the given email.
|
|
7877
7887
|
*
|
|
7878
7888
|
* @remarks
|
|
7879
7889
|
* This is useful to differentiate methods of sign-in for the same provider, eg.
|
|
@@ -7884,6 +7894,8 @@ function createAuthUri(auth, request) {
|
|
|
7884
7894
|
* @param auth - The {@link Auth} instance.
|
|
7885
7895
|
* @param email - The user's email address.
|
|
7886
7896
|
*
|
|
7897
|
+
* Deprecated. Migrating off of this method is recommended as a security best-practice.
|
|
7898
|
+
* Learn more in the Identity Platform documentation for [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection).
|
|
7887
7899
|
* @public
|
|
7888
7900
|
*/
|
|
7889
7901
|
function fetchSignInMethodsForEmail(auth, email) {
|
|
@@ -8138,6 +8150,9 @@ function updateProfile(user, _a) {
|
|
|
8138
8150
|
* @param user - The user.
|
|
8139
8151
|
* @param newEmail - The new email address.
|
|
8140
8152
|
*
|
|
8153
|
+
* Throws "auth/operation-not-allowed" error when [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled.
|
|
8154
|
+
* Deprecated - Use {@link verifyBeforeUpdateEmail} instead.
|
|
8155
|
+
*
|
|
8141
8156
|
* @public
|
|
8142
8157
|
*/
|
|
8143
8158
|
function updateEmail(user, newEmail) {
|
|
@@ -8856,7 +8871,7 @@ function multiFactor(user) {
|
|
|
8856
8871
|
}
|
|
8857
8872
|
|
|
8858
8873
|
var name = "@firebase/auth";
|
|
8859
|
-
var version = "1.4.0-canary.
|
|
8874
|
+
var version = "1.4.0-canary.e9ff107ee";
|
|
8860
8875
|
|
|
8861
8876
|
/**
|
|
8862
8877
|
* @license
|
|
@@ -11060,4 +11075,4 @@ function generateNoEvent() {
|
|
|
11060
11075
|
}
|
|
11061
11076
|
|
|
11062
11077
|
export { signInWithEmailAndPassword as $, ActionCodeOperation as A, PhoneAuthCredential as B, inMemoryPersistence as C, EmailAuthProvider as D, EmailAuthCredential as E, FactorId as F, FacebookAuthProvider as G, GoogleAuthProvider as H, GithubAuthProvider as I, OAuthProvider as J, SAMLAuthProvider as K, signInAnonymously as L, signInWithCredential as M, linkWithCredential as N, OperationType as O, ProviderId as P, reauthenticateWithCredential as Q, signInWithCustomToken as R, SignInMethod as S, TwitterAuthProvider as T, sendPasswordResetEmail as U, confirmPasswordReset as V, applyActionCode as W, checkActionCode as X, verifyPasswordResetCode as Y, createUserWithEmailAndPassword as Z, _signInWithRedirect as _, _reauthenticateWithRedirect as a, AuthImpl as a$, sendSignInLinkToEmail as a0, isSignInWithEmailLink as a1, signInWithEmailLink as a2, fetchSignInMethodsForEmail as a3, sendEmailVerification as a4, verifyBeforeUpdateEmail as a5, ActionCodeURL as a6, parseActionCodeURL as a7, updateProfile as a8, updateEmail as a9, _generateEventId as aA, AbstractPopupRedirectOperation as aB, _assertInstanceOf as aC, _withDefaultResolver as aD, FederatedAuthProvider as aE, _fail as aF, _getProjectConfig as aG, _getCurrentUrl as aH, _emulatorUrl as aI, _isChromeIOS as aJ, _isFirefox as aK, _isIOSStandalone as aL, _getRedirectUrl as aM, _setWindowLocation as aN, _isMobileBrowser as aO, _isSafari as aP, _isIOS as aQ, _getRedirectResult as aR, _overrideRedirectResult as aS, AuthEventManager as aT, debugFail as aU, finalizeEnrollPhoneMfa as aV, finalizeEnrollTotpMfa as aW, startEnrollTotpMfa as aX, _persistenceKeyName as aY, UserImpl as aZ, _getInstance as a_, updatePassword as aa, getIdToken as ab, getIdTokenResult as ac, unlink as ad, getAdditionalUserInfo as ae, reload as af, getMultiFactorResolver as ag, multiFactor as ah, _performApiRequest as ai, _addTidIfNecessary as aj, _assert as ak, Delay as al, _window as am, isV2 as an, _createError as ao, _loadJS as ap, _generateCallbackName as aq, getRecaptchaParams as ar, _isHttpOrHttps as as, _isWorker as at, _castAuth as au, _assertLinkedStatus as av, sendPhoneVerificationCode as aw, startEnrollPhoneMfa as ax, _link$1 as ay, debugAssert as az, _linkWithRedirect as b, _getClientVersion as b0, FetchProvider as b1, SAMLAuthCredential as b2, signInWithRedirect as b3, linkWithRedirect as b4, reauthenticateWithRedirect as b5, indexedDBLocalPersistence as c, cordovaPopupRedirectResolver as d, browserLocalPersistence as e, browserSessionPersistence as f, getRedirectResult as g, initializeRecaptchaConfig as h, initializeAuth as i, beforeAuthStateChanged as j, onAuthStateChanged as k, updateCurrentUser as l, signOut as m, revokeAccessToken as n, onIdTokenChanged as o, deleteUser as p, debugErrorMap as q, registerAuth as r, setPersistence as s, prodErrorMap as t, useDeviceLanguage as u, validatePassword as v, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as w, connectAuthEmulator as x, AuthCredential as y, OAuthCredential as z };
|
|
11063
|
-
//# sourceMappingURL=popup_redirect-
|
|
11078
|
+
//# sourceMappingURL=popup_redirect-755b181a.js.map
|