@firebase/auth 1.4.0 → 1.5.0-20231120214520
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-3d1ff45e.js → index-51eb0fe5.js} +23 -8
- package/dist/browser-cjs/index-51eb0fe5.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-73b8b0b9.js → popup_redirect-4157fc14.js} +23 -8
- package/dist/cordova/popup_redirect-4157fc14.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-61e5ac61.js → index-50a157a9.js} +23 -8
- package/dist/esm2017/index-50a157a9.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-22a88599.js → index-2922edb2.js} +23 -8
- package/dist/esm5/index-2922edb2.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 +2 -2
- package/dist/node/internal.js +2 -2
- 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-d9065ba0.js → totp-bad12bf6.js} +25 -30
- package/dist/node/totp-bad12bf6.js.map +1 -0
- package/dist/node-esm/index.js +2 -2
- package/dist/node-esm/internal.js +3 -3
- 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-d54b05d9.js → totp-668ca5f4.js} +25 -10
- package/dist/node-esm/totp-668ca5f4.js.map +1 -0
- package/dist/rn/{index-afa362da.js → index-4059ee6a.js} +23 -8
- package/dist/rn/index-4059ee6a.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 +2 -2
- package/dist/browser-cjs/index-3d1ff45e.js.map +0 -1
- package/dist/cordova/popup_redirect-73b8b0b9.js.map +0 -1
- package/dist/esm2017/index-61e5ac61.js.map +0 -1
- package/dist/esm5/index-22a88599.js.map +0 -1
- package/dist/node/totp-d9065ba0.js.map +0 -1
- package/dist/node-esm/totp-d54b05d9.js.map +0 -1
- package/dist/rn/index-afa362da.js.map +0 -1
package/dist/rn/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var app = require('@firebase/app');
|
|
6
|
-
var index = require('./index-
|
|
6
|
+
var index = require('./index-4059ee6a.js');
|
|
7
7
|
var tslib = require('tslib');
|
|
8
8
|
require('@firebase/util');
|
|
9
9
|
require('@firebase/component');
|
package/dist/rn/internal.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var index = require('./index-
|
|
5
|
+
var index = require('./index-4059ee6a.js');
|
|
6
6
|
var tslib = require('tslib');
|
|
7
7
|
var util = require('@firebase/util');
|
|
8
8
|
var app = require('@firebase/app');
|
|
@@ -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/src/api/errors.d.ts
CHANGED
|
@@ -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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@firebase/auth",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0-20231120214520",
|
|
4
4
|
"description": "The Firebase Authenticaton component of the Firebase JS SDK.",
|
|
5
5
|
"author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
|
|
6
6
|
"main": "dist/node/index.js",
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
"@firebase/component": "0.6.4",
|
|
116
116
|
"@firebase/logger": "0.4.0",
|
|
117
117
|
"@firebase/util": "1.9.3",
|
|
118
|
-
"
|
|
118
|
+
"undici": "5.26.5",
|
|
119
119
|
"tslib": "^2.1.0"
|
|
120
120
|
},
|
|
121
121
|
"license": "Apache-2.0",
|