@firebase/auth 1.4.0-canary.2a2e2b7ce → 1.4.0-canary.b2163b33d
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-c3b67fad.js → index-db223f1a.js} +23 -8
- package/dist/browser-cjs/index-db223f1a.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-ff76afdd.js → popup_redirect-883cbbaf.js} +23 -8
- package/dist/cordova/popup_redirect-883cbbaf.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-a7365f41.js → index-48c87752.js} +23 -8
- package/dist/esm2017/index-48c87752.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-013a0f76.js → index-5b28dbf7.js} +23 -8
- package/dist/esm5/index-5b28dbf7.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-0a561fea.js → totp-73dc4b95.js} +23 -8
- package/dist/node/totp-73dc4b95.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-ab1e1172.js → totp-e6a398c3.js} +23 -8
- package/dist/node-esm/totp-e6a398c3.js.map +1 -0
- package/dist/rn/{index-7a5a23cd.js → index-558f65b1.js} +23 -8
- package/dist/rn/index-558f65b1.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-c3b67fad.js.map +0 -1
- package/dist/cordova/popup_redirect-ff76afdd.js.map +0 -1
- package/dist/esm2017/index-a7365f41.js.map +0 -1
- package/dist/esm5/index-013a0f76.js.map +0 -1
- package/dist/node/totp-0a561fea.js.map +0 -1
- package/dist/node-esm/totp-ab1e1172.js.map +0 -1
- package/dist/rn/index-7a5a23cd.js.map +0 -1
package/dist/esm2017/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ActionCodeOperation, ai as ActionCodeURL, L as AuthCredential, I as AuthErrorCodes, M as EmailAuthCredential, V as EmailAuthProvider, W as FacebookAuthProvider, F as FactorId, Y as GithubAuthProvider, X as GoogleAuthProvider, N as OAuthCredential, Z as OAuthProvider, O as OperationType, Q as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, _ as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, $ as TwitterAuthProvider, a7 as applyActionCode, x as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a8 as checkActionCode, a6 as confirmPasswordReset, K as connectAuthEmulator, aa as createUserWithEmailAndPassword, G as debugErrorMap, E as deleteUser, af as fetchSignInMethodsForEmail, aq as getAdditionalUserInfo, o as getAuth, an as getIdToken, ao as getIdTokenResult, as as getMultiFactorResolver, j as getRedirectResult, U as inMemoryPersistence, i as indexedDBLocalPersistence, J as initializeAuth, t as initializeRecaptchaConfig, ad as isSignInWithEmailLink, a2 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, at as multiFactor, y as onAuthStateChanged, w as onIdTokenChanged, aj as parseActionCodeURL, H as prodErrorMap, a3 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, ar as reload, D as revokeAccessToken, ag as sendEmailVerification, a5 as sendPasswordResetEmail, ac as sendSignInLinkToEmail, q as setPersistence, a0 as signInAnonymously, a1 as signInWithCredential, a4 as signInWithCustomToken, ab as signInWithEmailAndPassword, ae as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, C as signOut, ap as unlink, B as updateCurrentUser, al as updateEmail, am as updatePassword, u as updatePhoneNumber, ak as updateProfile, z as useDeviceLanguage, v as validatePassword, ah as verifyBeforeUpdateEmail, a9 as verifyPasswordResetCode } from './index-
|
|
1
|
+
export { A as ActionCodeOperation, ai as ActionCodeURL, L as AuthCredential, I as AuthErrorCodes, M as EmailAuthCredential, V as EmailAuthProvider, W as FacebookAuthProvider, F as FactorId, Y as GithubAuthProvider, X as GoogleAuthProvider, N as OAuthCredential, Z as OAuthProvider, O as OperationType, Q as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, _ as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, $ as TwitterAuthProvider, a7 as applyActionCode, x as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a8 as checkActionCode, a6 as confirmPasswordReset, K as connectAuthEmulator, aa as createUserWithEmailAndPassword, G as debugErrorMap, E as deleteUser, af as fetchSignInMethodsForEmail, aq as getAdditionalUserInfo, o as getAuth, an as getIdToken, ao as getIdTokenResult, as as getMultiFactorResolver, j as getRedirectResult, U as inMemoryPersistence, i as indexedDBLocalPersistence, J as initializeAuth, t as initializeRecaptchaConfig, ad as isSignInWithEmailLink, a2 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, at as multiFactor, y as onAuthStateChanged, w as onIdTokenChanged, aj as parseActionCodeURL, H as prodErrorMap, a3 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, ar as reload, D as revokeAccessToken, ag as sendEmailVerification, a5 as sendPasswordResetEmail, ac as sendSignInLinkToEmail, q as setPersistence, a0 as signInAnonymously, a1 as signInWithCredential, a4 as signInWithCustomToken, ab as signInWithEmailAndPassword, ae as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, C as signOut, ap as unlink, B as updateCurrentUser, al as updateEmail, am as updatePassword, u as updatePhoneNumber, ak as updateProfile, z as useDeviceLanguage, v as validatePassword, ah as verifyBeforeUpdateEmail, a9 as verifyPasswordResetCode } from './index-48c87752.js';
|
|
2
2
|
import '@firebase/util';
|
|
3
3
|
import '@firebase/app';
|
|
4
4
|
import '@firebase/logger';
|
package/dist/esm2017/internal.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { au as debugAssert, av as _isIOS, aw as _isAndroid, ax as _fail, ay as _getRedirectUrl, az as _getProjectConfig, aA as _isIOS7Or8, aB as _createError, aC as _assert, aD as AuthEventManager, aE as _getInstance, b as browserLocalPersistence, aF as _persistenceKeyName, a as browserSessionPersistence, aG as _getRedirectResult, aH as _overrideRedirectResult, aI as _clearRedirectOutcomes, aJ as _castAuth } from './index-
|
|
2
|
-
export { A as ActionCodeOperation, ai as ActionCodeURL, L as AuthCredential, I as AuthErrorCodes, aL as AuthImpl, aO as AuthPopup, M as EmailAuthCredential, V as EmailAuthProvider, W as FacebookAuthProvider, F as FactorId, aP as FetchProvider, Y as GithubAuthProvider, X as GoogleAuthProvider, N as OAuthCredential, Z as OAuthProvider, O as OperationType, Q as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, aQ as SAMLAuthCredential, _ as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, $ as TwitterAuthProvider, aK as UserImpl, aC as _assert, aJ as _castAuth, ax as _fail, aN as _generateEventId, aM as _getClientVersion, aE as _getInstance, aG as _getRedirectResult, aH as _overrideRedirectResult, aF as _persistenceKeyName, a7 as applyActionCode, x as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a8 as checkActionCode, a6 as confirmPasswordReset, K as connectAuthEmulator, aa as createUserWithEmailAndPassword, G as debugErrorMap, E as deleteUser, af as fetchSignInMethodsForEmail, aq as getAdditionalUserInfo, o as getAuth, an as getIdToken, ao as getIdTokenResult, as as getMultiFactorResolver, j as getRedirectResult, U as inMemoryPersistence, i as indexedDBLocalPersistence, J as initializeAuth, t as initializeRecaptchaConfig, ad as isSignInWithEmailLink, a2 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, at as multiFactor, y as onAuthStateChanged, w as onIdTokenChanged, aj as parseActionCodeURL, H as prodErrorMap, a3 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, ar as reload, D as revokeAccessToken, ag as sendEmailVerification, a5 as sendPasswordResetEmail, ac as sendSignInLinkToEmail, q as setPersistence, a0 as signInAnonymously, a1 as signInWithCredential, a4 as signInWithCustomToken, ab as signInWithEmailAndPassword, ae as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, C as signOut, ap as unlink, B as updateCurrentUser, al as updateEmail, am as updatePassword, u as updatePhoneNumber, ak as updateProfile, z as useDeviceLanguage, v as validatePassword, ah as verifyBeforeUpdateEmail, a9 as verifyPasswordResetCode } from './index-
|
|
1
|
+
import { au as debugAssert, av as _isIOS, aw as _isAndroid, ax as _fail, ay as _getRedirectUrl, az as _getProjectConfig, aA as _isIOS7Or8, aB as _createError, aC as _assert, aD as AuthEventManager, aE as _getInstance, b as browserLocalPersistence, aF as _persistenceKeyName, a as browserSessionPersistence, aG as _getRedirectResult, aH as _overrideRedirectResult, aI as _clearRedirectOutcomes, aJ as _castAuth } from './index-48c87752.js';
|
|
2
|
+
export { A as ActionCodeOperation, ai as ActionCodeURL, L as AuthCredential, I as AuthErrorCodes, aL as AuthImpl, aO as AuthPopup, M as EmailAuthCredential, V as EmailAuthProvider, W as FacebookAuthProvider, F as FactorId, aP as FetchProvider, Y as GithubAuthProvider, X as GoogleAuthProvider, N as OAuthCredential, Z as OAuthProvider, O as OperationType, Q as PhoneAuthCredential, P as PhoneAuthProvider, m as PhoneMultiFactorGenerator, p as ProviderId, R as RecaptchaVerifier, aQ as SAMLAuthCredential, _ as SAMLAuthProvider, S as SignInMethod, T as TotpMultiFactorGenerator, n as TotpSecret, $ as TwitterAuthProvider, aK as UserImpl, aC as _assert, aJ as _castAuth, ax as _fail, aN as _generateEventId, aM as _getClientVersion, aE as _getInstance, aG as _getRedirectResult, aH as _overrideRedirectResult, aF as _persistenceKeyName, a7 as applyActionCode, x as beforeAuthStateChanged, b as browserLocalPersistence, k as browserPopupRedirectResolver, a as browserSessionPersistence, a8 as checkActionCode, a6 as confirmPasswordReset, K as connectAuthEmulator, aa as createUserWithEmailAndPassword, G as debugErrorMap, E as deleteUser, af as fetchSignInMethodsForEmail, aq as getAdditionalUserInfo, o as getAuth, an as getIdToken, ao as getIdTokenResult, as as getMultiFactorResolver, j as getRedirectResult, U as inMemoryPersistence, i as indexedDBLocalPersistence, J as initializeAuth, t as initializeRecaptchaConfig, ad as isSignInWithEmailLink, a2 as linkWithCredential, l as linkWithPhoneNumber, d as linkWithPopup, g as linkWithRedirect, at as multiFactor, y as onAuthStateChanged, w as onIdTokenChanged, aj as parseActionCodeURL, H as prodErrorMap, a3 as reauthenticateWithCredential, r as reauthenticateWithPhoneNumber, e as reauthenticateWithPopup, h as reauthenticateWithRedirect, ar as reload, D as revokeAccessToken, ag as sendEmailVerification, a5 as sendPasswordResetEmail, ac as sendSignInLinkToEmail, q as setPersistence, a0 as signInAnonymously, a1 as signInWithCredential, a4 as signInWithCustomToken, ab as signInWithEmailAndPassword, ae as signInWithEmailLink, s as signInWithPhoneNumber, c as signInWithPopup, f as signInWithRedirect, C as signOut, ap as unlink, B as updateCurrentUser, al as updateEmail, am as updatePassword, u as updatePhoneNumber, ak as updateProfile, z as useDeviceLanguage, v as validatePassword, ah as verifyBeforeUpdateEmail, a9 as verifyPasswordResetCode } from './index-48c87752.js';
|
|
3
3
|
import { querystringDecode } from '@firebase/util';
|
|
4
4
|
import '@firebase/app';
|
|
5
5
|
import '@firebase/logger';
|
|
@@ -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>;
|
|
@@ -175,7 +175,7 @@ function _debugErrorMap() {
|
|
|
175
175
|
_a["invalid-emulator-scheme" /* AuthErrorCode.INVALID_EMULATOR_SCHEME */] = 'Emulator URL must start with a valid scheme (http:// or https://).',
|
|
176
176
|
_a["invalid-api-key" /* AuthErrorCode.INVALID_API_KEY */] = 'Your API key is invalid, please check you have copied it correctly.',
|
|
177
177
|
_a["invalid-cert-hash" /* AuthErrorCode.INVALID_CERT_HASH */] = 'The SHA-1 certificate hash provided is invalid.',
|
|
178
|
-
_a["invalid-credential" /* AuthErrorCode.
|
|
178
|
+
_a["invalid-credential" /* AuthErrorCode.INVALID_CREDENTIAL */] = 'The supplied auth credential is incorrect, malformed or has expired.',
|
|
179
179
|
_a["invalid-message-payload" /* AuthErrorCode.INVALID_MESSAGE_PAYLOAD */] = 'The email template corresponding to this action contains invalid characters in its message. ' +
|
|
180
180
|
'Please fix by going to the Auth email templates section in the Firebase Console.',
|
|
181
181
|
_a["invalid-multi-factor-session" /* AuthErrorCode.INVALID_MFA_SESSION */] = 'The request does not contain a valid proof of first factor successful sign-in.',
|
|
@@ -352,6 +352,7 @@ var AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY = {
|
|
|
352
352
|
INVALID_EMAIL: 'auth/invalid-email',
|
|
353
353
|
INVALID_EMULATOR_SCHEME: 'auth/invalid-emulator-scheme',
|
|
354
354
|
INVALID_IDP_RESPONSE: 'auth/invalid-credential',
|
|
355
|
+
INVALID_LOGIN_CREDENTIALS: 'auth/invalid-credential',
|
|
355
356
|
INVALID_MESSAGE_PAYLOAD: 'auth/invalid-message-payload',
|
|
356
357
|
INVALID_MFA_SESSION: 'auth/invalid-multi-factor-session',
|
|
357
358
|
INVALID_OAUTH_CLIENT_ID: 'auth/invalid-oauth-client-id',
|
|
@@ -817,12 +818,15 @@ var SERVER_ERROR_MAP = (_a$1 = {},
|
|
|
817
818
|
_a$1["INVALID_PASSWORD" /* ServerError.INVALID_PASSWORD */] = "wrong-password" /* AuthErrorCode.INVALID_PASSWORD */,
|
|
818
819
|
// This can only happen if the SDK sends a bad request.
|
|
819
820
|
_a$1["MISSING_PASSWORD" /* ServerError.MISSING_PASSWORD */] = "missing-password" /* AuthErrorCode.MISSING_PASSWORD */,
|
|
821
|
+
// Thrown if Email Enumeration Protection is enabled in the project and the email or password is
|
|
822
|
+
// invalid.
|
|
823
|
+
_a$1["INVALID_LOGIN_CREDENTIALS" /* ServerError.INVALID_LOGIN_CREDENTIALS */] = "invalid-credential" /* AuthErrorCode.INVALID_CREDENTIAL */,
|
|
820
824
|
// Sign up with email and password errors.
|
|
821
825
|
_a$1["EMAIL_EXISTS" /* ServerError.EMAIL_EXISTS */] = "email-already-in-use" /* AuthErrorCode.EMAIL_EXISTS */,
|
|
822
826
|
_a$1["PASSWORD_LOGIN_DISABLED" /* ServerError.PASSWORD_LOGIN_DISABLED */] = "operation-not-allowed" /* AuthErrorCode.OPERATION_NOT_ALLOWED */,
|
|
823
827
|
// Verify assertion for sign in with credential errors:
|
|
824
|
-
_a$1["INVALID_IDP_RESPONSE" /* ServerError.INVALID_IDP_RESPONSE */] = "invalid-credential" /* AuthErrorCode.
|
|
825
|
-
_a$1["INVALID_PENDING_TOKEN" /* ServerError.INVALID_PENDING_TOKEN */] = "invalid-credential" /* AuthErrorCode.
|
|
828
|
+
_a$1["INVALID_IDP_RESPONSE" /* ServerError.INVALID_IDP_RESPONSE */] = "invalid-credential" /* AuthErrorCode.INVALID_CREDENTIAL */,
|
|
829
|
+
_a$1["INVALID_PENDING_TOKEN" /* ServerError.INVALID_PENDING_TOKEN */] = "invalid-credential" /* AuthErrorCode.INVALID_CREDENTIAL */,
|
|
826
830
|
_a$1["FEDERATED_USER_ID_ALREADY_LINKED" /* ServerError.FEDERATED_USER_ID_ALREADY_LINKED */] = "credential-already-in-use" /* AuthErrorCode.CREDENTIAL_ALREADY_IN_USE */,
|
|
827
831
|
// This can only happen if the SDK sends a bad request.
|
|
828
832
|
_a$1["MISSING_REQ_TYPE" /* ServerError.MISSING_REQ_TYPE */] = "internal-error" /* AuthErrorCode.INTERNAL_ERROR */,
|
|
@@ -844,7 +848,7 @@ var SERVER_ERROR_MAP = (_a$1 = {},
|
|
|
844
848
|
// Phone Auth related errors.
|
|
845
849
|
_a$1["INVALID_CODE" /* ServerError.INVALID_CODE */] = "invalid-verification-code" /* AuthErrorCode.INVALID_CODE */,
|
|
846
850
|
_a$1["INVALID_SESSION_INFO" /* ServerError.INVALID_SESSION_INFO */] = "invalid-verification-id" /* AuthErrorCode.INVALID_SESSION_INFO */,
|
|
847
|
-
_a$1["INVALID_TEMPORARY_PROOF" /* ServerError.INVALID_TEMPORARY_PROOF */] = "invalid-credential" /* AuthErrorCode.
|
|
851
|
+
_a$1["INVALID_TEMPORARY_PROOF" /* ServerError.INVALID_TEMPORARY_PROOF */] = "invalid-credential" /* AuthErrorCode.INVALID_CREDENTIAL */,
|
|
848
852
|
_a$1["MISSING_SESSION_INFO" /* ServerError.MISSING_SESSION_INFO */] = "missing-verification-id" /* AuthErrorCode.MISSING_SESSION_INFO */,
|
|
849
853
|
_a$1["SESSION_EXPIRED" /* ServerError.SESSION_EXPIRED */] = "code-expired" /* AuthErrorCode.CODE_EXPIRED */,
|
|
850
854
|
// Other action code errors when additional settings passed.
|
|
@@ -6609,7 +6613,9 @@ function recachePasswordPolicy(auth) {
|
|
|
6609
6613
|
});
|
|
6610
6614
|
}
|
|
6611
6615
|
/**
|
|
6612
|
-
* Sends a password reset email to the given email address.
|
|
6616
|
+
* Sends a password reset email to the given email address. This method does not throw an error when
|
|
6617
|
+
* there's no user account with the given email address and
|
|
6618
|
+
* [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled.
|
|
6613
6619
|
*
|
|
6614
6620
|
* @remarks
|
|
6615
6621
|
* To complete the password reset, call {@link confirmPasswordReset} with the code supplied in
|
|
@@ -6850,6 +6856,8 @@ function createUserWithEmailAndPassword(auth, email, password) {
|
|
|
6850
6856
|
*
|
|
6851
6857
|
* @remarks
|
|
6852
6858
|
* Fails with an error if the email address and password do not match.
|
|
6859
|
+
* When [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled,
|
|
6860
|
+
* this method fails with "auth/invalid-credential" in case of an invalid email/password.
|
|
6853
6861
|
*
|
|
6854
6862
|
* Note: The user's password is NOT the password used to access the user's email account. The
|
|
6855
6863
|
* email address serves as a unique identifier for the user, and the password is used to access
|
|
@@ -7058,7 +7066,9 @@ function createAuthUri(auth, request) {
|
|
|
7058
7066
|
* limitations under the License.
|
|
7059
7067
|
*/
|
|
7060
7068
|
/**
|
|
7061
|
-
* Gets the list of possible sign in methods for the given email address.
|
|
7069
|
+
* Gets the list of possible sign in methods for the given email address. This method returns an
|
|
7070
|
+
* empty list when [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled, irrespective of the number of
|
|
7071
|
+
* authentication methods available for the given email.
|
|
7062
7072
|
*
|
|
7063
7073
|
* @remarks
|
|
7064
7074
|
* This is useful to differentiate methods of sign-in for the same provider, eg.
|
|
@@ -7069,6 +7079,8 @@ function createAuthUri(auth, request) {
|
|
|
7069
7079
|
* @param auth - The {@link Auth} instance.
|
|
7070
7080
|
* @param email - The user's email address.
|
|
7071
7081
|
*
|
|
7082
|
+
* Deprecated. Migrating off of this method is recommended as a security best-practice.
|
|
7083
|
+
* Learn more in the Identity Platform documentation for [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection).
|
|
7072
7084
|
* @public
|
|
7073
7085
|
*/
|
|
7074
7086
|
function fetchSignInMethodsForEmail(auth, email) {
|
|
@@ -7323,6 +7335,9 @@ function updateProfile(user, _a) {
|
|
|
7323
7335
|
* @param user - The user.
|
|
7324
7336
|
* @param newEmail - The new email address.
|
|
7325
7337
|
*
|
|
7338
|
+
* Throws "auth/operation-not-allowed" error when [Email Enumeration Protection](https://cloud.google.com/identity-platform/docs/admin/email-enumeration-protection) is enabled.
|
|
7339
|
+
* Deprecated - Use {@link verifyBeforeUpdateEmail} instead.
|
|
7340
|
+
*
|
|
7326
7341
|
* @public
|
|
7327
7342
|
*/
|
|
7328
7343
|
function updateEmail(user, newEmail) {
|
|
@@ -12245,7 +12260,7 @@ function _isEmptyString(input) {
|
|
|
12245
12260
|
}
|
|
12246
12261
|
|
|
12247
12262
|
var name = "@firebase/auth";
|
|
12248
|
-
var version = "1.4.0-canary.
|
|
12263
|
+
var version = "1.4.0-canary.b2163b33d";
|
|
12249
12264
|
|
|
12250
12265
|
/**
|
|
12251
12266
|
* @license
|
|
@@ -12498,4 +12513,4 @@ function getAuth(app) {
|
|
|
12498
12513
|
registerAuth("Browser" /* ClientPlatform.BROWSER */);
|
|
12499
12514
|
|
|
12500
12515
|
export { TwitterAuthProvider as $, ActionCodeOperation as A, updateCurrentUser as B, signOut as C, revokeAccessToken as D, deleteUser as E, FactorId as F, debugErrorMap as G, prodErrorMap as H, AUTH_ERROR_CODES_MAP_DO_NOT_USE_INTERNALLY as I, initializeAuth as J, connectAuthEmulator as K, AuthCredential as L, EmailAuthCredential as M, OAuthCredential as N, OperationType as O, PhoneAuthProvider as P, PhoneAuthCredential as Q, RecaptchaVerifier as R, SignInMethod as S, TotpMultiFactorGenerator as T, inMemoryPersistence as U, EmailAuthProvider as V, FacebookAuthProvider as W, GoogleAuthProvider as X, GithubAuthProvider as Y, OAuthProvider as Z, SAMLAuthProvider as _, browserSessionPersistence as a, signInAnonymously as a0, signInWithCredential as a1, linkWithCredential as a2, reauthenticateWithCredential as a3, signInWithCustomToken as a4, sendPasswordResetEmail as a5, confirmPasswordReset as a6, applyActionCode as a7, checkActionCode as a8, verifyPasswordResetCode as a9, _isIOS7Or8 as aA, _assert as aB, _createError as aC, AuthEventManager as aD, _getInstance as aE, _persistenceKeyName as aF, _clearRedirectOutcomes as aG, _getRedirectResult as aH, _overrideRedirectResult as aI, _castAuth as aJ, UserImpl as aK, AuthImpl as aL, _getClientVersion as aM, _generateEventId as aN, AuthPopup as aO, FetchProvider as aP, SAMLAuthCredential as aQ, createUserWithEmailAndPassword as aa, signInWithEmailAndPassword as ab, sendSignInLinkToEmail as ac, isSignInWithEmailLink as ad, signInWithEmailLink as ae, fetchSignInMethodsForEmail as af, sendEmailVerification as ag, verifyBeforeUpdateEmail as ah, ActionCodeURL as ai, parseActionCodeURL as aj, updateProfile as ak, updateEmail as al, updatePassword as am, getIdToken as an, getIdTokenResult as ao, unlink as ap, getAdditionalUserInfo as aq, reload as ar, getMultiFactorResolver as as, multiFactor as at, _isIOS as au, _isAndroid as av, _fail as aw, _getRedirectUrl as ax, debugAssert as ay, _getProjectConfig as az, browserLocalPersistence as b, signInWithPopup as c, linkWithPopup as d, reauthenticateWithPopup as e, signInWithRedirect as f, linkWithRedirect as g, reauthenticateWithRedirect as h, indexedDBLocalPersistence as i, getRedirectResult as j, browserPopupRedirectResolver as k, linkWithPhoneNumber as l, PhoneMultiFactorGenerator as m, TotpSecret as n, getAuth as o, ProviderId as p, setPersistence as q, reauthenticateWithPhoneNumber as r, signInWithPhoneNumber as s, initializeRecaptchaConfig as t, updatePhoneNumber as u, validatePassword as v, onIdTokenChanged as w, beforeAuthStateChanged as x, onAuthStateChanged as y, useDeviceLanguage as z };
|
|
12501
|
-
//# sourceMappingURL=index-
|
|
12516
|
+
//# sourceMappingURL=index-5b28dbf7.js.map
|