firebase-admin 13.9.0 → 13.10.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/lib/app/core.d.ts +1 -1
- package/lib/app/core.js +1 -1
- package/lib/app/credential-factory.d.ts +1 -1
- package/lib/app/credential-factory.js +1 -1
- package/lib/app/credential-internal.d.ts +1 -1
- package/lib/app/credential-internal.js +4 -4
- 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 +1 -1
- package/lib/app-check/app-check-api-client-internal.d.ts +1 -1
- package/lib/app-check/app-check-api-client-internal.js +18 -3
- package/lib/app-check/app-check-api.d.ts +19 -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 +2 -2
- package/lib/app-check/index.d.ts +1 -1
- package/lib/app-check/index.js +1 -1
- package/lib/app-check/token-generator.d.ts +1 -1
- package/lib/app-check/token-generator.js +1 -1
- 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 +1 -1
- package/lib/auth/auth-config.d.ts +1 -1
- package/lib/auth/auth-config.js +1 -1
- 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 +1 -1
- package/lib/auth/identifier.d.ts +1 -1
- package/lib/auth/identifier.js +1 -1
- package/lib/auth/index.d.ts +1 -1
- package/lib/auth/index.js +1 -1
- 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 -1
- package/lib/auth/token-generator.js +1 -1
- package/lib/auth/token-verifier.d.ts +1 -1
- package/lib/auth/token-verifier.js +1 -1
- package/lib/auth/user-import-builder.d.ts +1 -1
- package/lib/auth/user-import-builder.js +1 -1
- 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 +1 -1
- package/lib/data-connect/validate-admin-args.d.ts +1 -1
- package/lib/data-connect/validate-admin-args.js +1 -1
- package/lib/database/database-namespace.d.ts +1 -1
- package/lib/database/database-namespace.js +1 -1
- package/lib/database/database.d.ts +1 -1
- package/lib/database/database.js +1 -1
- package/lib/database/index.d.ts +1 -1
- package/lib/database/index.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/lib/functions/functions-api-client-internal.d.ts +1 -1
- package/lib/functions/functions-api-client-internal.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- package/lib/machine-learning/machine-learning-api-client.d.ts +1 -1
- package/lib/machine-learning/machine-learning-api-client.js +1 -1
- 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 +1 -1
- package/lib/messaging/index.js +1 -1
- package/lib/messaging/messaging-api-request-internal.d.ts +1 -1
- package/lib/messaging/messaging-api-request-internal.js +1 -1
- package/lib/messaging/messaging-api.d.ts +1 -1
- 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 +1 -1
- package/lib/messaging/messaging-internal.d.ts +1 -1
- package/lib/messaging/messaging-internal.js +1 -1
- package/lib/messaging/messaging-namespace.d.ts +1 -1
- package/lib/messaging/messaging-namespace.js +1 -1
- package/lib/messaging/messaging.d.ts +1 -1
- package/lib/messaging/messaging.js +1 -1
- package/lib/phone-number-verification/index.d.ts +1 -1
- package/lib/phone-number-verification/index.js +1 -1
- package/lib/phone-number-verification/phone-number-verification-api-client-internal.d.ts +1 -1
- package/lib/phone-number-verification/phone-number-verification-api-client-internal.js +1 -1
- package/lib/phone-number-verification/phone-number-verification-api.d.ts +1 -1
- package/lib/phone-number-verification/phone-number-verification-api.js +1 -1
- package/lib/phone-number-verification/phone-number-verification.d.ts +1 -1
- package/lib/phone-number-verification/phone-number-verification.js +1 -1
- package/lib/phone-number-verification/token-verifier.d.ts +1 -1
- package/lib/phone-number-verification/token-verifier.js +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +3 -3
- package/lib/remote-config/index.d.ts +1 -1
- package/lib/remote-config/index.js +1 -1
- 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 +1 -1
- 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 -1
- package/lib/security-rules/security-rules.js +1 -1
- package/lib/storage/index.d.ts +1 -1
- package/lib/storage/index.js +1 -1
- 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 +1 -1
- package/lib/utils/api-request.d.ts +1 -1
- package/lib/utils/api-request.js +1 -1
- package/lib/utils/crypto-signer.d.ts +1 -1
- package/lib/utils/crypto-signer.js +2 -2
- package/lib/utils/deep-copy.d.ts +1 -1
- package/lib/utils/deep-copy.js +1 -1
- package/lib/utils/error.d.ts +1 -1
- package/lib/utils/error.js +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +1 -1
- package/lib/utils/jwt.d.ts +1 -1
- package/lib/utils/jwt.js +1 -1
- package/lib/utils/validator.d.ts +1 -1
- package/lib/utils/validator.js +1 -1
- package/package.json +3 -6
package/lib/app/core.d.ts
CHANGED
package/lib/app/core.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v13.
|
|
1
|
+
/*! firebase-admin v13.10.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -21,6 +21,7 @@ exports.ImpersonatedServiceAccountCredential = exports.RefreshTokenCredential =
|
|
|
21
21
|
exports.isApplicationDefault = isApplicationDefault;
|
|
22
22
|
exports.getApplicationDefault = getApplicationDefault;
|
|
23
23
|
const fs = require("fs");
|
|
24
|
+
const node_crypto_1 = require("node:crypto");
|
|
24
25
|
const google_auth_library_1 = require("google-auth-library");
|
|
25
26
|
const error_1 = require("../utils/error");
|
|
26
27
|
const util = require("../utils/validator");
|
|
@@ -173,10 +174,9 @@ class ServiceAccount {
|
|
|
173
174
|
if (typeof errorMessage !== 'undefined') {
|
|
174
175
|
throw new error_1.FirebaseAppError(error_1.AppErrorCodes.INVALID_CREDENTIAL, errorMessage);
|
|
175
176
|
}
|
|
176
|
-
//
|
|
177
|
-
const forge = require('node-forge');
|
|
177
|
+
// Validate private key format using native crypto module
|
|
178
178
|
try {
|
|
179
|
-
|
|
179
|
+
(0, node_crypto_1.createPrivateKey)(this.privateKey);
|
|
180
180
|
}
|
|
181
181
|
catch (error) {
|
|
182
182
|
throw new error_1.FirebaseAppError(error_1.AppErrorCodes.INVALID_CREDENTIAL, 'Failed to parse private key: ' + error);
|
package/lib/app/credential.d.ts
CHANGED
package/lib/app/credential.js
CHANGED
package/lib/app/firebase-app.js
CHANGED
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 v13.
|
|
1
|
+
/*! firebase-admin v13.10.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -48,20 +48,35 @@ class AppCheckApiClient {
|
|
|
48
48
|
* @param appId - The mobile App ID.
|
|
49
49
|
* @returns A promise that fulfills with a `AppCheckToken`.
|
|
50
50
|
*/
|
|
51
|
-
exchangeToken(customToken, appId) {
|
|
51
|
+
exchangeToken(customToken, appId, options) {
|
|
52
52
|
if (!validator.isNonEmptyString(appId)) {
|
|
53
53
|
throw new FirebaseAppCheckError('invalid-argument', '`appId` must be a non-empty string.');
|
|
54
54
|
}
|
|
55
55
|
if (!validator.isNonEmptyString(customToken)) {
|
|
56
56
|
throw new FirebaseAppCheckError('invalid-argument', '`customToken` must be a non-empty string.');
|
|
57
57
|
}
|
|
58
|
+
if (typeof options?.limitedUse !== 'undefined' && !validator.isBoolean(options.limitedUse)) {
|
|
59
|
+
throw new FirebaseAppCheckError('invalid-argument', '`limitedUse` must be a boolean value.');
|
|
60
|
+
}
|
|
61
|
+
if (typeof options?.jti !== 'undefined') {
|
|
62
|
+
if (!validator.isString(options.jti)) {
|
|
63
|
+
throw new FirebaseAppCheckError('invalid-argument', '`jti` must be a string value.');
|
|
64
|
+
}
|
|
65
|
+
if (!options.limitedUse) {
|
|
66
|
+
throw new FirebaseAppCheckError('invalid-argument', '`jti` cannot be specified without setting `limitedUse` to `true`.');
|
|
67
|
+
}
|
|
68
|
+
}
|
|
58
69
|
return this.getUrl(appId)
|
|
59
70
|
.then((url) => {
|
|
60
71
|
const request = {
|
|
61
72
|
method: 'POST',
|
|
62
73
|
url,
|
|
63
74
|
headers: FIREBASE_APP_CHECK_CONFIG_HEADERS,
|
|
64
|
-
data: {
|
|
75
|
+
data: {
|
|
76
|
+
customToken,
|
|
77
|
+
...(options?.limitedUse !== undefined && { limitedUse: options.limitedUse }),
|
|
78
|
+
...(options?.jti !== undefined && { jti: options.jti }),
|
|
79
|
+
}
|
|
65
80
|
};
|
|
66
81
|
return this.httpClient.send(request);
|
|
67
82
|
})
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v13.
|
|
1
|
+
/*! firebase-admin v13.10.0 */
|
|
2
2
|
/*!
|
|
3
3
|
* @license
|
|
4
4
|
* Copyright 2021 Google LLC
|
|
@@ -37,6 +37,24 @@ export interface AppCheckTokenOptions {
|
|
|
37
37
|
* be valid. This value must be between 30 minutes and 7 days, inclusive.
|
|
38
38
|
*/
|
|
39
39
|
ttlMillis?: number;
|
|
40
|
+
/**
|
|
41
|
+
* Specifies whether this token is for a limited use context.
|
|
42
|
+
* To enable this token to be used with the replay protection feature, set this to `true`.
|
|
43
|
+
* The default value is `false`.
|
|
44
|
+
*/
|
|
45
|
+
limitedUse?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Specifies the desired `jti` claim (Section 4.1.7 of RFC 7519) in the returned App
|
|
48
|
+
* Check token. Limited-use App Check tokens with the same `jti` will be counted as the
|
|
49
|
+
* same token for the purposes of replay protection.
|
|
50
|
+
*
|
|
51
|
+
* If this field is omitted or is empty, a randomly generated `jti` will be used in the
|
|
52
|
+
* returned App Check token.
|
|
53
|
+
*
|
|
54
|
+
* An error is returned if this field is specified without setting `limitedUse` to
|
|
55
|
+
* `true`.
|
|
56
|
+
*/
|
|
57
|
+
jti?: string;
|
|
40
58
|
}
|
|
41
59
|
/**
|
|
42
60
|
* Interface representing options for the {@link AppCheck.verifyToken} method.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v13.
|
|
1
|
+
/*! firebase-admin v13.10.0 */
|
|
2
2
|
"use strict";
|
|
3
3
|
/*!
|
|
4
4
|
* @license
|
|
@@ -55,7 +55,7 @@ class AppCheck {
|
|
|
55
55
|
createToken(appId, options) {
|
|
56
56
|
return this.tokenGenerator.createCustomToken(appId, options)
|
|
57
57
|
.then((customToken) => {
|
|
58
|
-
return this.client.exchangeToken(customToken, appId);
|
|
58
|
+
return this.client.exchangeToken(customToken, appId, options);
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
61
|
/**
|
package/lib/app-check/index.d.ts
CHANGED
package/lib/app-check/index.js
CHANGED
package/lib/auth/auth-config.js
CHANGED
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
package/lib/auth/identifier.d.ts
CHANGED
package/lib/auth/identifier.js
CHANGED
package/lib/auth/index.d.ts
CHANGED
package/lib/auth/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! firebase-admin v13.
|
|
1
|
+
/*! firebase-admin v13.10.0 */
|
|
2
2
|
import { SmsRegionConfig, MultiFactorConfig, MultiFactorAuthServerConfig, RecaptchaConfig, RecaptchaAuthServerConfig, PasswordPolicyAuthServerConfig, PasswordPolicyConfig, EmailPrivacyConfig, MobileLinksConfig } 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
package/lib/auth/user-record.js
CHANGED
package/lib/credential/index.js
CHANGED