firebase-admin 12.7.0 → 13.0.0
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/README.md +1 -2
- package/lib/app/core.d.ts +1 -2
- package/lib/app/core.js +1 -1
- package/lib/app/credential-factory.d.ts +1 -2
- package/lib/app/credential-factory.js +5 -6
- package/lib/app/credential-internal.d.ts +37 -35
- package/lib/app/credential-internal.js +194 -294
- package/lib/app/credential.d.ts +1 -1
- package/lib/app/credential.js +1 -1
- package/lib/app/firebase-app.d.ts +1 -1
- package/lib/app/firebase-app.js +1 -1
- package/lib/app/firebase-namespace.d.ts +1 -1
- package/lib/app/firebase-namespace.js +1 -1
- package/lib/app/index.d.ts +1 -1
- package/lib/app/index.js +1 -1
- package/lib/app/lifecycle.d.ts +1 -1
- package/lib/app/lifecycle.js +6 -6
- package/lib/app-check/app-check-api-client-internal.d.ts +1 -1
- package/lib/app-check/app-check-api-client-internal.js +1 -1
- package/lib/app-check/app-check-api.d.ts +1 -1
- package/lib/app-check/app-check-api.js +1 -1
- package/lib/app-check/app-check-namespace.d.ts +1 -1
- package/lib/app-check/app-check-namespace.js +1 -1
- package/lib/app-check/app-check.d.ts +1 -1
- package/lib/app-check/app-check.js +1 -1
- package/lib/app-check/index.d.ts +1 -1
- package/lib/app-check/index.js +3 -3
- package/lib/app-check/token-generator.d.ts +1 -1
- package/lib/app-check/token-generator.js +3 -3
- package/lib/app-check/token-verifier.d.ts +1 -1
- package/lib/app-check/token-verifier.js +1 -1
- package/lib/auth/action-code-settings-builder.d.ts +1 -1
- package/lib/auth/action-code-settings-builder.js +1 -1
- package/lib/auth/auth-api-request.d.ts +1 -1
- package/lib/auth/auth-api-request.js +3 -4
- package/lib/auth/auth-config.d.ts +1 -1
- package/lib/auth/auth-config.js +3 -3
- package/lib/auth/auth-namespace.d.ts +1 -1
- package/lib/auth/auth-namespace.js +1 -1
- package/lib/auth/auth.d.ts +1 -1
- package/lib/auth/auth.js +1 -1
- package/lib/auth/base-auth.d.ts +1 -1
- package/lib/auth/base-auth.js +3 -3
- package/lib/auth/identifier.d.ts +1 -1
- package/lib/auth/identifier.js +5 -6
- package/lib/auth/index.d.ts +1 -1
- package/lib/auth/index.js +3 -3
- package/lib/auth/project-config-manager.d.ts +1 -1
- package/lib/auth/project-config-manager.js +1 -1
- package/lib/auth/project-config.d.ts +1 -1
- package/lib/auth/project-config.js +1 -1
- package/lib/auth/tenant-manager.d.ts +1 -1
- package/lib/auth/tenant-manager.js +1 -1
- package/lib/auth/tenant.d.ts +1 -1
- package/lib/auth/tenant.js +1 -1
- package/lib/auth/token-generator.d.ts +1 -2
- package/lib/auth/token-generator.js +3 -3
- package/lib/auth/token-verifier.d.ts +1 -1
- package/lib/auth/token-verifier.js +5 -5
- package/lib/auth/user-import-builder.d.ts +1 -2
- package/lib/auth/user-import-builder.js +3 -3
- package/lib/auth/user-record.d.ts +1 -1
- package/lib/auth/user-record.js +1 -1
- package/lib/credential/index.d.ts +1 -1
- package/lib/credential/index.js +1 -1
- package/lib/data-connect/data-connect-api-client-internal.d.ts +1 -1
- package/lib/data-connect/data-connect-api-client-internal.js +1 -1
- package/lib/data-connect/data-connect-api.d.ts +1 -1
- package/lib/data-connect/data-connect-api.js +1 -1
- package/lib/data-connect/data-connect.d.ts +1 -1
- package/lib/data-connect/data-connect.js +1 -1
- package/lib/data-connect/index.d.ts +1 -1
- package/lib/data-connect/index.js +3 -3
- package/lib/database/database-namespace.d.ts +1 -1
- package/lib/database/database-namespace.js +1 -1
- package/lib/database/database.d.ts +1 -2
- package/lib/database/database.js +1 -1
- package/lib/database/index.d.ts +1 -1
- package/lib/database/index.js +4 -4
- package/lib/default-namespace.d.ts +1 -1
- package/lib/default-namespace.js +1 -1
- package/lib/eventarc/cloudevent.d.ts +1 -1
- package/lib/eventarc/cloudevent.js +1 -1
- package/lib/eventarc/eventarc-client-internal.d.ts +1 -1
- package/lib/eventarc/eventarc-client-internal.js +1 -1
- package/lib/eventarc/eventarc-utils.d.ts +1 -1
- package/lib/eventarc/eventarc-utils.js +3 -3
- package/lib/eventarc/eventarc.d.ts +1 -1
- package/lib/eventarc/eventarc.js +1 -1
- package/lib/eventarc/index.d.ts +1 -1
- package/lib/eventarc/index.js +3 -3
- package/lib/extensions/extensions-api-client-internal.d.ts +1 -1
- package/lib/extensions/extensions-api-client-internal.js +1 -1
- package/lib/extensions/extensions-api.d.ts +1 -1
- package/lib/extensions/extensions-api.js +1 -1
- package/lib/extensions/extensions.d.ts +1 -1
- package/lib/extensions/extensions.js +1 -1
- package/lib/extensions/index.d.ts +1 -1
- package/lib/extensions/index.js +3 -3
- package/lib/firebase-namespace-api.d.ts +1 -1
- package/lib/firebase-namespace-api.js +1 -1
- package/lib/firestore/firestore-internal.d.ts +1 -1
- package/lib/firestore/firestore-internal.js +3 -3
- package/lib/firestore/firestore-namespace.d.ts +1 -1
- package/lib/firestore/firestore-namespace.js +1 -1
- package/lib/firestore/index.d.ts +1 -1
- package/lib/firestore/index.js +4 -4
- package/lib/functions/functions-api-client-internal.d.ts +1 -1
- package/lib/functions/functions-api-client-internal.js +3 -2
- package/lib/functions/functions-api.d.ts +1 -1
- package/lib/functions/functions-api.js +1 -1
- package/lib/functions/functions.d.ts +1 -1
- package/lib/functions/functions.js +1 -1
- package/lib/functions/index.d.ts +1 -1
- package/lib/functions/index.js +3 -3
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/installations/index.d.ts +1 -1
- package/lib/installations/index.js +3 -3
- package/lib/installations/installations-namespace.d.ts +1 -1
- package/lib/installations/installations-namespace.js +1 -1
- package/lib/installations/installations-request-handler.d.ts +1 -1
- package/lib/installations/installations-request-handler.js +1 -1
- package/lib/installations/installations.d.ts +1 -1
- package/lib/installations/installations.js +1 -1
- package/lib/instance-id/index.d.ts +1 -1
- package/lib/instance-id/index.js +3 -3
- package/lib/instance-id/instance-id-namespace.d.ts +1 -1
- package/lib/instance-id/instance-id-namespace.js +1 -1
- package/lib/instance-id/instance-id.d.ts +1 -1
- package/lib/instance-id/instance-id.js +1 -1
- package/lib/machine-learning/index.d.ts +1 -1
- package/lib/machine-learning/index.js +3 -3
- package/lib/machine-learning/machine-learning-api-client.d.ts +1 -1
- package/lib/machine-learning/machine-learning-api-client.js +3 -3
- package/lib/machine-learning/machine-learning-namespace.d.ts +1 -1
- package/lib/machine-learning/machine-learning-namespace.js +1 -1
- package/lib/machine-learning/machine-learning-utils.d.ts +1 -1
- package/lib/machine-learning/machine-learning-utils.js +1 -1
- package/lib/machine-learning/machine-learning.d.ts +1 -1
- package/lib/machine-learning/machine-learning.js +1 -1
- package/lib/messaging/index.d.ts +2 -2
- package/lib/messaging/index.js +3 -3
- package/lib/messaging/messaging-api-request-internal.d.ts +2 -12
- package/lib/messaging/messaging-api-request-internal.js +4 -40
- package/lib/messaging/messaging-api.d.ts +8 -94
- package/lib/messaging/messaging-api.js +1 -1
- package/lib/messaging/messaging-errors-internal.d.ts +1 -1
- package/lib/messaging/messaging-errors-internal.js +3 -4
- package/lib/messaging/messaging-internal.d.ts +1 -1
- package/lib/messaging/messaging-internal.js +4 -3
- package/lib/messaging/messaging-namespace.d.ts +2 -22
- package/lib/messaging/messaging-namespace.js +1 -1
- package/lib/messaging/messaging.d.ts +3 -149
- package/lib/messaging/messaging.js +2 -539
- package/lib/project-management/android-app.d.ts +1 -1
- package/lib/project-management/android-app.js +1 -1
- package/lib/project-management/app-metadata.d.ts +1 -1
- package/lib/project-management/app-metadata.js +1 -1
- package/lib/project-management/index.d.ts +1 -1
- package/lib/project-management/index.js +3 -3
- package/lib/project-management/ios-app.d.ts +1 -1
- package/lib/project-management/ios-app.js +1 -1
- package/lib/project-management/project-management-api-request-internal.d.ts +1 -1
- package/lib/project-management/project-management-api-request-internal.js +3 -3
- package/lib/project-management/project-management-namespace.d.ts +1 -1
- package/lib/project-management/project-management-namespace.js +1 -1
- package/lib/project-management/project-management.d.ts +1 -1
- package/lib/project-management/project-management.js +1 -1
- package/lib/remote-config/condition-evaluator-internal.d.ts +1 -1
- package/lib/remote-config/condition-evaluator-internal.js +6 -14
- package/lib/remote-config/index.d.ts +1 -1
- package/lib/remote-config/index.js +3 -3
- package/lib/remote-config/internal/value-impl.d.ts +1 -1
- package/lib/remote-config/internal/value-impl.js +1 -1
- package/lib/remote-config/remote-config-api-client-internal.d.ts +1 -1
- package/lib/remote-config/remote-config-api-client-internal.js +1 -1
- package/lib/remote-config/remote-config-api.d.ts +1 -1
- package/lib/remote-config/remote-config-api.js +1 -1
- package/lib/remote-config/remote-config-namespace.d.ts +1 -1
- package/lib/remote-config/remote-config-namespace.js +1 -1
- package/lib/remote-config/remote-config.d.ts +1 -1
- package/lib/remote-config/remote-config.js +1 -1
- package/lib/security-rules/index.d.ts +1 -1
- package/lib/security-rules/index.js +3 -3
- package/lib/security-rules/security-rules-api-client-internal.d.ts +1 -1
- package/lib/security-rules/security-rules-api-client-internal.js +1 -1
- package/lib/security-rules/security-rules-internal.d.ts +1 -1
- package/lib/security-rules/security-rules-internal.js +1 -1
- package/lib/security-rules/security-rules-namespace.d.ts +1 -1
- package/lib/security-rules/security-rules-namespace.js +1 -1
- package/lib/security-rules/security-rules.d.ts +1 -2
- package/lib/security-rules/security-rules.js +1 -1
- package/lib/storage/index.d.ts +1 -1
- package/lib/storage/index.js +4 -4
- package/lib/storage/storage-namespace.d.ts +1 -1
- package/lib/storage/storage-namespace.js +1 -1
- package/lib/storage/storage.d.ts +1 -1
- package/lib/storage/storage.js +1 -1
- package/lib/storage/utils.d.ts +1 -1
- package/lib/storage/utils.js +2 -3
- package/lib/utils/api-request.d.ts +1 -5
- package/lib/utils/api-request.js +23 -8
- package/lib/utils/crypto-signer.d.ts +1 -2
- package/lib/utils/crypto-signer.js +3 -3
- package/lib/utils/deep-copy.d.ts +1 -1
- package/lib/utils/deep-copy.js +3 -4
- package/lib/utils/error.d.ts +1 -1
- package/lib/utils/error.js +1 -1
- package/lib/utils/index.d.ts +2 -2
- package/lib/utils/index.js +19 -16
- package/lib/utils/jwt.d.ts +1 -2
- package/lib/utils/jwt.js +5 -5
- package/lib/utils/validator.d.ts +1 -2
- package/lib/utils/validator.js +20 -21
- package/package.json +14 -13
- package/CHANGELOG.md +0 -4
- package/lib/messaging/batch-request-internal.d.ts +0 -55
- package/lib/messaging/batch-request-internal.js +0 -127
package/lib/app/index.d.ts
CHANGED
package/lib/app/index.js
CHANGED
package/lib/app/lifecycle.d.ts
CHANGED
package/lib/app/lifecycle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v13.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -17,7 +17,11 @@
|
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.FIREBASE_CONFIG_VAR = exports.
|
|
20
|
+
exports.FIREBASE_CONFIG_VAR = exports.defaultAppStore = exports.AppStore = void 0;
|
|
21
|
+
exports.initializeApp = initializeApp;
|
|
22
|
+
exports.getApp = getApp;
|
|
23
|
+
exports.getApps = getApps;
|
|
24
|
+
exports.deleteApp = deleteApp;
|
|
21
25
|
const fs = require("fs");
|
|
22
26
|
const validator = require("../utils/validator");
|
|
23
27
|
const error_1 = require("../utils/error");
|
|
@@ -101,15 +105,12 @@ exports.defaultAppStore = new AppStore();
|
|
|
101
105
|
function initializeApp(options, appName = DEFAULT_APP_NAME) {
|
|
102
106
|
return exports.defaultAppStore.initializeApp(options, appName);
|
|
103
107
|
}
|
|
104
|
-
exports.initializeApp = initializeApp;
|
|
105
108
|
function getApp(appName = DEFAULT_APP_NAME) {
|
|
106
109
|
return exports.defaultAppStore.getApp(appName);
|
|
107
110
|
}
|
|
108
|
-
exports.getApp = getApp;
|
|
109
111
|
function getApps() {
|
|
110
112
|
return exports.defaultAppStore.getApps();
|
|
111
113
|
}
|
|
112
|
-
exports.getApps = getApps;
|
|
113
114
|
/**
|
|
114
115
|
* Renders this given `App` unusable and frees the resources of
|
|
115
116
|
* all associated services (though it does *not* clean up any backend
|
|
@@ -130,7 +131,6 @@ exports.getApps = getApps;
|
|
|
130
131
|
function deleteApp(app) {
|
|
131
132
|
return exports.defaultAppStore.deleteApp(app);
|
|
132
133
|
}
|
|
133
|
-
exports.deleteApp = deleteApp;
|
|
134
134
|
/**
|
|
135
135
|
* Constant holding the environment variable name with the default config.
|
|
136
136
|
* If the environment variable contains a string that starts with '{' it will be parsed as JSON,
|
package/lib/app-check/index.d.ts
CHANGED
package/lib/app-check/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v13.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.
|
|
20
|
+
exports.AppCheck = void 0;
|
|
21
|
+
exports.getAppCheck = getAppCheck;
|
|
21
22
|
/**
|
|
22
23
|
* Firebase App Check.
|
|
23
24
|
*
|
|
@@ -60,4 +61,3 @@ function getAppCheck(app) {
|
|
|
60
61
|
const firebaseApp = app;
|
|
61
62
|
return firebaseApp.getOrInitService('appCheck', (app) => new app_check_1.AppCheck(app));
|
|
62
63
|
}
|
|
63
|
-
exports.getAppCheck = getAppCheck;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v13.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.
|
|
20
|
+
exports.AppCheckTokenGenerator = void 0;
|
|
21
|
+
exports.appCheckErrorFromCryptoSignerError = appCheckErrorFromCryptoSignerError;
|
|
21
22
|
const validator = require("../utils/validator");
|
|
22
23
|
const utils_1 = require("../utils");
|
|
23
24
|
const crypto_signer_1 = require("../utils/crypto-signer");
|
|
@@ -141,7 +142,6 @@ function appCheckErrorFromCryptoSignerError(err) {
|
|
|
141
142
|
}
|
|
142
143
|
return new app_check_api_client_internal_1.FirebaseAppCheckError(mapToAppCheckErrorCode(err.code), err.message);
|
|
143
144
|
}
|
|
144
|
-
exports.appCheckErrorFromCryptoSignerError = appCheckErrorFromCryptoSignerError;
|
|
145
145
|
function mapToAppCheckErrorCode(code) {
|
|
146
146
|
switch (code) {
|
|
147
147
|
case crypto_signer_1.CryptoSignerErrorCode.INVALID_CREDENTIAL:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v13.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.
|
|
20
|
+
exports.TenantAwareAuthRequestHandler = exports.AuthRequestHandler = exports.AbstractAuthRequestHandler = exports.FIREBASE_AUTH_SIGN_UP_NEW_USER = exports.FIREBASE_AUTH_SET_ACCOUNT_INFO = exports.FIREBASE_AUTH_BATCH_DELETE_ACCOUNTS = exports.FIREBASE_AUTH_DELETE_ACCOUNT = exports.FIREBASE_AUTH_GET_ACCOUNTS_INFO = exports.FIREBASE_AUTH_GET_ACCOUNT_INFO = exports.FIREBASE_AUTH_DOWNLOAD_ACCOUNT = exports.FIREBASE_AUTH_UPLOAD_ACCOUNT = exports.FIREBASE_AUTH_CREATE_SESSION_COOKIE = exports.EMAIL_ACTION_REQUEST_TYPES = exports.RESERVED_CLAIMS = void 0;
|
|
21
|
+
exports.useEmulator = useEmulator;
|
|
21
22
|
const validator = require("../utils/validator");
|
|
22
23
|
const deep_copy_1 = require("../utils/deep-copy");
|
|
23
24
|
const error_1 = require("../utils/error");
|
|
@@ -32,7 +33,6 @@ const project_config_1 = require("./project-config");
|
|
|
32
33
|
/** Firebase Auth request header. */
|
|
33
34
|
const FIREBASE_AUTH_HEADERS = {
|
|
34
35
|
'X-Client-Version': `Node/Admin/${utils.getSdkVersion()}`,
|
|
35
|
-
'X-Goog-Api-Client': `gl-node/${process.versions.node} fire-admin/${utils.getSdkVersion()}`
|
|
36
36
|
};
|
|
37
37
|
/** Firebase Auth request timeout duration in milliseconds. */
|
|
38
38
|
const FIREBASE_AUTH_TIMEOUT = 25000;
|
|
@@ -1946,4 +1946,3 @@ function emulatorHost() {
|
|
|
1946
1946
|
function useEmulator() {
|
|
1947
1947
|
return !!emulatorHost();
|
|
1948
1948
|
}
|
|
1949
|
-
exports.useEmulator = useEmulator;
|
package/lib/auth/auth-config.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v13.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* Copyright 2018 Google Inc.
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.EmailPrivacyAuthConfig = exports.PasswordPolicyAuthConfig = exports.RecaptchaAuthConfig = exports.SmsRegionsAuthConfig = exports.OIDCConfig = exports.SAMLConfig = exports.EmailSignInConfig = exports.
|
|
19
|
+
exports.EmailPrivacyAuthConfig = exports.PasswordPolicyAuthConfig = exports.RecaptchaAuthConfig = exports.SmsRegionsAuthConfig = exports.OIDCConfig = exports.SAMLConfig = exports.EmailSignInConfig = exports.MultiFactorAuthConfig = exports.MAXIMUM_TEST_PHONE_NUMBERS = void 0;
|
|
20
|
+
exports.validateTestPhoneNumbers = validateTestPhoneNumbers;
|
|
20
21
|
const validator = require("../utils/validator");
|
|
21
22
|
const deep_copy_1 = require("../utils/deep-copy");
|
|
22
23
|
const error_1 = require("../utils/error");
|
|
@@ -219,7 +220,6 @@ function validateTestPhoneNumbers(testPhoneNumbers) {
|
|
|
219
220
|
}
|
|
220
221
|
}
|
|
221
222
|
}
|
|
222
|
-
exports.validateTestPhoneNumbers = validateTestPhoneNumbers;
|
|
223
223
|
/**
|
|
224
224
|
* Defines the email sign-in config class used to convert client side EmailSignInConfig
|
|
225
225
|
* to a format that is understood by the Auth server.
|
package/lib/auth/auth.d.ts
CHANGED
package/lib/auth/auth.js
CHANGED
package/lib/auth/base-auth.d.ts
CHANGED
package/lib/auth/base-auth.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v13.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* Copyright 2021 Google Inc.
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.BaseAuth =
|
|
19
|
+
exports.BaseAuth = void 0;
|
|
20
|
+
exports.createFirebaseTokenGenerator = createFirebaseTokenGenerator;
|
|
20
21
|
const error_1 = require("../utils/error");
|
|
21
22
|
const deep_copy_1 = require("../utils/deep-copy");
|
|
22
23
|
const validator = require("../utils/validator");
|
|
@@ -39,7 +40,6 @@ function createFirebaseTokenGenerator(app, tenantId) {
|
|
|
39
40
|
throw (0, token_generator_1.handleCryptoSignerError)(err);
|
|
40
41
|
}
|
|
41
42
|
}
|
|
42
|
-
exports.createFirebaseTokenGenerator = createFirebaseTokenGenerator;
|
|
43
43
|
/**
|
|
44
44
|
* Common parent interface for both `Auth` and `TenantAwareAuth` APIs.
|
|
45
45
|
*/
|
package/lib/auth/identifier.d.ts
CHANGED
package/lib/auth/identifier.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v13.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* Copyright 2020 Google Inc.
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
19
|
+
exports.isUidIdentifier = isUidIdentifier;
|
|
20
|
+
exports.isEmailIdentifier = isEmailIdentifier;
|
|
21
|
+
exports.isPhoneIdentifier = isPhoneIdentifier;
|
|
22
|
+
exports.isProviderIdentifier = isProviderIdentifier;
|
|
20
23
|
/*
|
|
21
24
|
* User defined type guards. See
|
|
22
25
|
* https://www.typescriptlang.org/docs/handbook/advanced-types.html#user-defined-type-guards
|
|
@@ -24,17 +27,13 @@ exports.isProviderIdentifier = exports.isPhoneIdentifier = exports.isEmailIdenti
|
|
|
24
27
|
function isUidIdentifier(id) {
|
|
25
28
|
return id.uid !== undefined;
|
|
26
29
|
}
|
|
27
|
-
exports.isUidIdentifier = isUidIdentifier;
|
|
28
30
|
function isEmailIdentifier(id) {
|
|
29
31
|
return id.email !== undefined;
|
|
30
32
|
}
|
|
31
|
-
exports.isEmailIdentifier = isEmailIdentifier;
|
|
32
33
|
function isPhoneIdentifier(id) {
|
|
33
34
|
return id.phoneNumber !== undefined;
|
|
34
35
|
}
|
|
35
|
-
exports.isPhoneIdentifier = isPhoneIdentifier;
|
|
36
36
|
function isProviderIdentifier(id) {
|
|
37
37
|
const pid = id;
|
|
38
38
|
return pid.providerId !== undefined && pid.providerUid !== undefined;
|
|
39
39
|
}
|
|
40
|
-
exports.isProviderIdentifier = isProviderIdentifier;
|
package/lib/auth/index.d.ts
CHANGED
package/lib/auth/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v13.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* Copyright 2020 Google Inc.
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.AuthClientErrorCode = exports.FirebaseAuthError = exports.UserRecord = exports.UserMetadata = exports.UserInfo = exports.PhoneMultiFactorInfo = exports.MultiFactorSettings = exports.MultiFactorInfo = exports.ProjectConfigManager = exports.ProjectConfig = exports.TenantManager = exports.TenantAwareAuth = exports.Tenant = exports.BaseAuth = exports.Auth =
|
|
19
|
+
exports.AuthClientErrorCode = exports.FirebaseAuthError = exports.UserRecord = exports.UserMetadata = exports.UserInfo = exports.PhoneMultiFactorInfo = exports.MultiFactorSettings = exports.MultiFactorInfo = exports.ProjectConfigManager = exports.ProjectConfig = exports.TenantManager = exports.TenantAwareAuth = exports.Tenant = exports.BaseAuth = exports.Auth = void 0;
|
|
20
|
+
exports.getAuth = getAuth;
|
|
20
21
|
/**
|
|
21
22
|
* Firebase Authentication.
|
|
22
23
|
*
|
|
@@ -52,7 +53,6 @@ function getAuth(app) {
|
|
|
52
53
|
const firebaseApp = app;
|
|
53
54
|
return firebaseApp.getOrInitService('auth', (app) => new auth_1.Auth(app));
|
|
54
55
|
}
|
|
55
|
-
exports.getAuth = getAuth;
|
|
56
56
|
var auth_2 = require("./auth");
|
|
57
57
|
Object.defineProperty(exports, "Auth", { enumerable: true, get: function () { return auth_2.Auth; } });
|
|
58
58
|
var base_auth_1 = require("./base-auth");
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v13.0.0 */
|
|
2
2
|
import { SmsRegionConfig, MultiFactorConfig, MultiFactorAuthServerConfig, RecaptchaConfig, RecaptchaAuthServerConfig, PasswordPolicyAuthServerConfig, PasswordPolicyConfig, EmailPrivacyConfig } from './auth-config';
|
|
3
3
|
/**
|
|
4
4
|
* Interface representing the properties to update on the provided project config.
|
package/lib/auth/tenant.d.ts
CHANGED
package/lib/auth/tenant.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v13.0.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2017 Google Inc.
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
|
-
/// <reference types="node" />
|
|
19
18
|
import { CryptoSigner } from '../utils/crypto-signer';
|
|
20
19
|
import { Algorithm } from 'jsonwebtoken';
|
|
21
20
|
export declare const BLACKLISTED_CLAIMS: string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v13.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
* limitations under the License.
|
|
18
18
|
*/
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.
|
|
20
|
+
exports.FirebaseTokenGenerator = exports.EmulatedSigner = exports.BLACKLISTED_CLAIMS = void 0;
|
|
21
|
+
exports.handleCryptoSignerError = handleCryptoSignerError;
|
|
21
22
|
const error_1 = require("../utils/error");
|
|
22
23
|
const crypto_signer_1 = require("../utils/crypto-signer");
|
|
23
24
|
const validator = require("../utils/validator");
|
|
@@ -185,7 +186,6 @@ function handleCryptoSignerError(err) {
|
|
|
185
186
|
}
|
|
186
187
|
return new error_1.FirebaseAuthError(mapToAuthClientErrorCode(err.code), err.message);
|
|
187
188
|
}
|
|
188
|
-
exports.handleCryptoSignerError = handleCryptoSignerError;
|
|
189
189
|
function mapToAuthClientErrorCode(code) {
|
|
190
190
|
switch (code) {
|
|
191
191
|
case crypto_signer_1.CryptoSignerErrorCode.INVALID_CREDENTIAL:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v13.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* Copyright 2018 Google Inc.
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.
|
|
19
|
+
exports.FirebaseTokenVerifier = exports.SESSION_COOKIE_INFO = exports.AUTH_BLOCKING_TOKEN_INFO = exports.ID_TOKEN_INFO = void 0;
|
|
20
|
+
exports.createIdTokenVerifier = createIdTokenVerifier;
|
|
21
|
+
exports.createAuthBlockingTokenVerifier = createAuthBlockingTokenVerifier;
|
|
22
|
+
exports.createSessionCookieVerifier = createSessionCookieVerifier;
|
|
20
23
|
const error_1 = require("../utils/error");
|
|
21
24
|
const util = require("../utils/index");
|
|
22
25
|
const validator = require("../utils/validator");
|
|
@@ -291,7 +294,6 @@ exports.FirebaseTokenVerifier = FirebaseTokenVerifier;
|
|
|
291
294
|
function createIdTokenVerifier(app) {
|
|
292
295
|
return new FirebaseTokenVerifier(CLIENT_CERT_URL, 'https://securetoken.google.com/', exports.ID_TOKEN_INFO, app);
|
|
293
296
|
}
|
|
294
|
-
exports.createIdTokenVerifier = createIdTokenVerifier;
|
|
295
297
|
/**
|
|
296
298
|
* Creates a new FirebaseTokenVerifier to verify Firebase Auth Blocking tokens.
|
|
297
299
|
*
|
|
@@ -302,7 +304,6 @@ exports.createIdTokenVerifier = createIdTokenVerifier;
|
|
|
302
304
|
function createAuthBlockingTokenVerifier(app) {
|
|
303
305
|
return new FirebaseTokenVerifier(CLIENT_CERT_URL, 'https://securetoken.google.com/', exports.AUTH_BLOCKING_TOKEN_INFO, app);
|
|
304
306
|
}
|
|
305
|
-
exports.createAuthBlockingTokenVerifier = createAuthBlockingTokenVerifier;
|
|
306
307
|
/**
|
|
307
308
|
* Creates a new FirebaseTokenVerifier to verify Firebase session cookies.
|
|
308
309
|
*
|
|
@@ -313,4 +314,3 @@ exports.createAuthBlockingTokenVerifier = createAuthBlockingTokenVerifier;
|
|
|
313
314
|
function createSessionCookieVerifier(app) {
|
|
314
315
|
return new FirebaseTokenVerifier(SESSION_COOKIE_CERT_URL, 'https://session.firebase.google.com/', exports.SESSION_COOKIE_INFO, app);
|
|
315
316
|
}
|
|
316
|
-
exports.createSessionCookieVerifier = createSessionCookieVerifier;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v13.0.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* Copyright 2018 Google Inc.
|
|
4
4
|
*
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
* See the License for the specific language governing permissions and
|
|
15
15
|
* limitations under the License.
|
|
16
16
|
*/
|
|
17
|
-
/// <reference types="node" />
|
|
18
17
|
import { FirebaseArrayIndexError } from '../app/index';
|
|
19
18
|
import { UpdateMultiFactorInfoRequest, MultiFactorUpdateSettings } from './auth-config';
|
|
20
19
|
export type HashAlgorithmType = 'SCRYPT' | 'STANDARD_SCRYPT' | 'HMAC_SHA512' | 'HMAC_SHA256' | 'HMAC_SHA1' | 'HMAC_MD5' | 'MD5' | 'PBKDF_SHA1' | 'BCRYPT' | 'PBKDF2_SHA256' | 'SHA512' | 'SHA256' | 'SHA1';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin
|
|
1
|
+
/*! firebase-admin v13.0.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* Copyright 2018 Google Inc.
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
|
-
exports.UserImportBuilder =
|
|
19
|
+
exports.UserImportBuilder = void 0;
|
|
20
|
+
exports.convertMultiFactorInfoToServerFormat = convertMultiFactorInfoToServerFormat;
|
|
20
21
|
const deep_copy_1 = require("../utils/deep-copy");
|
|
21
22
|
const utils = require("../utils");
|
|
22
23
|
const validator = require("../utils/validator");
|
|
@@ -60,7 +61,6 @@ function convertMultiFactorInfoToServerFormat(multiFactorInfo) {
|
|
|
60
61
|
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.UNSUPPORTED_SECOND_FACTOR, `Unsupported second factor "${JSON.stringify(multiFactorInfo)}" provided.`);
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
|
-
exports.convertMultiFactorInfoToServerFormat = convertMultiFactorInfoToServerFormat;
|
|
64
64
|
function isPhoneFactor(multiFactorInfo) {
|
|
65
65
|
return multiFactorInfo.factorId === 'phone';
|
|
66
66
|
}
|
package/lib/auth/user-record.js
CHANGED
package/lib/credential/index.js
CHANGED