firebase-admin 13.7.0 → 13.9.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.
Files changed (229) hide show
  1. package/README.md +2 -2
  2. package/lib/app/core.d.ts +1 -1
  3. package/lib/app/core.js +1 -1
  4. package/lib/app/credential-factory.d.ts +1 -1
  5. package/lib/app/credential-factory.js +1 -1
  6. package/lib/app/credential-internal.d.ts +1 -1
  7. package/lib/app/credential-internal.js +1 -1
  8. package/lib/app/credential.d.ts +1 -1
  9. package/lib/app/credential.js +1 -1
  10. package/lib/app/firebase-app.d.ts +1 -1
  11. package/lib/app/firebase-app.js +1 -1
  12. package/lib/app/firebase-namespace.d.ts +1 -1
  13. package/lib/app/firebase-namespace.js +1 -1
  14. package/lib/app/index.d.ts +1 -1
  15. package/lib/app/index.js +1 -1
  16. package/lib/app/lifecycle.d.ts +1 -1
  17. package/lib/app/lifecycle.js +1 -1
  18. package/lib/app-check/app-check-api-client-internal.d.ts +1 -1
  19. package/lib/app-check/app-check-api-client-internal.js +1 -1
  20. package/lib/app-check/app-check-api.d.ts +1 -1
  21. package/lib/app-check/app-check-api.js +1 -1
  22. package/lib/app-check/app-check-namespace.d.ts +1 -1
  23. package/lib/app-check/app-check-namespace.js +1 -1
  24. package/lib/app-check/app-check.d.ts +1 -1
  25. package/lib/app-check/app-check.js +1 -1
  26. package/lib/app-check/index.d.ts +1 -1
  27. package/lib/app-check/index.js +1 -1
  28. package/lib/app-check/token-generator.d.ts +1 -1
  29. package/lib/app-check/token-generator.js +1 -1
  30. package/lib/app-check/token-verifier.d.ts +1 -1
  31. package/lib/app-check/token-verifier.js +1 -1
  32. package/lib/auth/action-code-settings-builder.d.ts +1 -1
  33. package/lib/auth/action-code-settings-builder.js +1 -1
  34. package/lib/auth/auth-api-request.d.ts +1 -1
  35. package/lib/auth/auth-api-request.js +1 -1
  36. package/lib/auth/auth-config.d.ts +1 -1
  37. package/lib/auth/auth-config.js +1 -1
  38. package/lib/auth/auth-namespace.d.ts +1 -1
  39. package/lib/auth/auth-namespace.js +1 -1
  40. package/lib/auth/auth.d.ts +1 -1
  41. package/lib/auth/auth.js +1 -1
  42. package/lib/auth/base-auth.d.ts +1 -1
  43. package/lib/auth/base-auth.js +1 -1
  44. package/lib/auth/identifier.d.ts +1 -1
  45. package/lib/auth/identifier.js +1 -1
  46. package/lib/auth/index.d.ts +1 -1
  47. package/lib/auth/index.js +1 -1
  48. package/lib/auth/project-config-manager.d.ts +1 -1
  49. package/lib/auth/project-config-manager.js +1 -1
  50. package/lib/auth/project-config.d.ts +1 -1
  51. package/lib/auth/project-config.js +1 -1
  52. package/lib/auth/tenant-manager.d.ts +1 -1
  53. package/lib/auth/tenant-manager.js +1 -1
  54. package/lib/auth/tenant.d.ts +1 -1
  55. package/lib/auth/tenant.js +1 -1
  56. package/lib/auth/token-generator.d.ts +1 -1
  57. package/lib/auth/token-generator.js +1 -1
  58. package/lib/auth/token-verifier.d.ts +1 -1
  59. package/lib/auth/token-verifier.js +1 -1
  60. package/lib/auth/user-import-builder.d.ts +1 -1
  61. package/lib/auth/user-import-builder.js +1 -1
  62. package/lib/auth/user-record.d.ts +1 -1
  63. package/lib/auth/user-record.js +1 -1
  64. package/lib/credential/index.d.ts +1 -1
  65. package/lib/credential/index.js +1 -1
  66. package/lib/data-connect/data-connect-api-client-internal.d.ts +1 -1
  67. package/lib/data-connect/data-connect-api-client-internal.js +1 -1
  68. package/lib/data-connect/data-connect-api.d.ts +1 -1
  69. package/lib/data-connect/data-connect-api.js +1 -1
  70. package/lib/data-connect/data-connect.d.ts +1 -1
  71. package/lib/data-connect/data-connect.js +1 -1
  72. package/lib/data-connect/index.d.ts +1 -1
  73. package/lib/data-connect/index.js +1 -1
  74. package/lib/data-connect/validate-admin-args.d.ts +1 -1
  75. package/lib/data-connect/validate-admin-args.js +1 -1
  76. package/lib/database/database-namespace.d.ts +1 -1
  77. package/lib/database/database-namespace.js +1 -1
  78. package/lib/database/database.d.ts +1 -1
  79. package/lib/database/database.js +1 -1
  80. package/lib/database/index.d.ts +1 -1
  81. package/lib/database/index.js +1 -1
  82. package/lib/default-namespace.d.ts +1 -1
  83. package/lib/default-namespace.js +1 -1
  84. package/lib/esm/phone-number-verification/index.js +4 -0
  85. package/lib/eventarc/cloudevent.d.ts +1 -1
  86. package/lib/eventarc/cloudevent.js +1 -1
  87. package/lib/eventarc/eventarc-client-internal.d.ts +1 -1
  88. package/lib/eventarc/eventarc-client-internal.js +1 -1
  89. package/lib/eventarc/eventarc-utils.d.ts +1 -1
  90. package/lib/eventarc/eventarc-utils.js +1 -1
  91. package/lib/eventarc/eventarc.d.ts +1 -1
  92. package/lib/eventarc/eventarc.js +1 -1
  93. package/lib/eventarc/index.d.ts +1 -1
  94. package/lib/eventarc/index.js +1 -1
  95. package/lib/extensions/extensions-api-client-internal.d.ts +1 -1
  96. package/lib/extensions/extensions-api-client-internal.js +1 -1
  97. package/lib/extensions/extensions-api.d.ts +1 -1
  98. package/lib/extensions/extensions-api.js +1 -1
  99. package/lib/extensions/extensions.d.ts +1 -1
  100. package/lib/extensions/extensions.js +1 -1
  101. package/lib/extensions/index.d.ts +1 -1
  102. package/lib/extensions/index.js +1 -1
  103. package/lib/firebase-namespace-api.d.ts +1 -1
  104. package/lib/firebase-namespace-api.js +1 -1
  105. package/lib/firestore/firestore-internal.d.ts +1 -1
  106. package/lib/firestore/firestore-internal.js +1 -1
  107. package/lib/firestore/firestore-namespace.d.ts +1 -1
  108. package/lib/firestore/firestore-namespace.js +1 -1
  109. package/lib/firestore/index.d.ts +1 -1
  110. package/lib/firestore/index.js +1 -1
  111. package/lib/functions/functions-api-client-internal.d.ts +1 -1
  112. package/lib/functions/functions-api-client-internal.js +1 -1
  113. package/lib/functions/functions-api.d.ts +1 -1
  114. package/lib/functions/functions-api.js +1 -1
  115. package/lib/functions/functions.d.ts +1 -1
  116. package/lib/functions/functions.js +1 -1
  117. package/lib/functions/index.d.ts +1 -1
  118. package/lib/functions/index.js +1 -1
  119. package/lib/index.d.ts +1 -1
  120. package/lib/index.js +1 -1
  121. package/lib/installations/index.d.ts +1 -1
  122. package/lib/installations/index.js +1 -1
  123. package/lib/installations/installations-namespace.d.ts +1 -1
  124. package/lib/installations/installations-namespace.js +1 -1
  125. package/lib/installations/installations-request-handler.d.ts +1 -1
  126. package/lib/installations/installations-request-handler.js +1 -1
  127. package/lib/installations/installations.d.ts +1 -1
  128. package/lib/installations/installations.js +1 -1
  129. package/lib/instance-id/index.d.ts +1 -1
  130. package/lib/instance-id/index.js +1 -1
  131. package/lib/instance-id/instance-id-namespace.d.ts +1 -1
  132. package/lib/instance-id/instance-id-namespace.js +1 -1
  133. package/lib/instance-id/instance-id.d.ts +1 -1
  134. package/lib/instance-id/instance-id.js +1 -1
  135. package/lib/machine-learning/index.d.ts +1 -1
  136. package/lib/machine-learning/index.js +1 -1
  137. package/lib/machine-learning/machine-learning-api-client.d.ts +1 -1
  138. package/lib/machine-learning/machine-learning-api-client.js +1 -1
  139. package/lib/machine-learning/machine-learning-namespace.d.ts +1 -1
  140. package/lib/machine-learning/machine-learning-namespace.js +1 -1
  141. package/lib/machine-learning/machine-learning-utils.d.ts +1 -1
  142. package/lib/machine-learning/machine-learning-utils.js +1 -1
  143. package/lib/machine-learning/machine-learning.d.ts +1 -1
  144. package/lib/machine-learning/machine-learning.js +1 -1
  145. package/lib/messaging/index.d.ts +1 -1
  146. package/lib/messaging/index.js +1 -1
  147. package/lib/messaging/messaging-api-request-internal.d.ts +1 -1
  148. package/lib/messaging/messaging-api-request-internal.js +1 -1
  149. package/lib/messaging/messaging-api.d.ts +11 -1
  150. package/lib/messaging/messaging-api.js +1 -1
  151. package/lib/messaging/messaging-errors-internal.d.ts +1 -1
  152. package/lib/messaging/messaging-errors-internal.js +1 -1
  153. package/lib/messaging/messaging-internal.d.ts +1 -1
  154. package/lib/messaging/messaging-internal.js +3 -1
  155. package/lib/messaging/messaging-namespace.d.ts +1 -1
  156. package/lib/messaging/messaging-namespace.js +1 -1
  157. package/lib/messaging/messaging.d.ts +1 -1
  158. package/lib/messaging/messaging.js +1 -1
  159. package/lib/phone-number-verification/index.d.ts +50 -0
  160. package/lib/phone-number-verification/index.js +60 -0
  161. package/lib/phone-number-verification/phone-number-verification-api-client-internal.d.ts +48 -0
  162. package/lib/phone-number-verification/phone-number-verification-api-client-internal.js +52 -0
  163. package/lib/phone-number-verification/phone-number-verification-api.d.ts +72 -0
  164. package/lib/phone-number-verification/phone-number-verification-api.js +22 -0
  165. package/lib/phone-number-verification/phone-number-verification.d.ts +39 -0
  166. package/lib/phone-number-verification/phone-number-verification.js +54 -0
  167. package/lib/phone-number-verification/token-verifier.d.ts +35 -0
  168. package/lib/phone-number-verification/token-verifier.js +170 -0
  169. package/lib/project-management/android-app.d.ts +1 -1
  170. package/lib/project-management/android-app.js +1 -1
  171. package/lib/project-management/app-metadata.d.ts +1 -1
  172. package/lib/project-management/app-metadata.js +1 -1
  173. package/lib/project-management/index.d.ts +1 -1
  174. package/lib/project-management/index.js +1 -1
  175. package/lib/project-management/ios-app.d.ts +1 -1
  176. package/lib/project-management/ios-app.js +1 -1
  177. package/lib/project-management/project-management-api-request-internal.d.ts +1 -1
  178. package/lib/project-management/project-management-api-request-internal.js +1 -1
  179. package/lib/project-management/project-management-namespace.d.ts +1 -1
  180. package/lib/project-management/project-management-namespace.js +1 -1
  181. package/lib/project-management/project-management.d.ts +1 -1
  182. package/lib/project-management/project-management.js +1 -1
  183. package/lib/remote-config/condition-evaluator-internal.d.ts +1 -1
  184. package/lib/remote-config/condition-evaluator-internal.js +1 -1
  185. package/lib/remote-config/index.d.ts +1 -1
  186. package/lib/remote-config/index.js +1 -1
  187. package/lib/remote-config/internal/value-impl.d.ts +1 -1
  188. package/lib/remote-config/internal/value-impl.js +1 -1
  189. package/lib/remote-config/remote-config-api-client-internal.d.ts +1 -1
  190. package/lib/remote-config/remote-config-api-client-internal.js +1 -1
  191. package/lib/remote-config/remote-config-api.d.ts +6 -1
  192. package/lib/remote-config/remote-config-api.js +1 -1
  193. package/lib/remote-config/remote-config-namespace.d.ts +1 -1
  194. package/lib/remote-config/remote-config-namespace.js +1 -1
  195. package/lib/remote-config/remote-config.d.ts +1 -1
  196. package/lib/remote-config/remote-config.js +40 -1
  197. package/lib/security-rules/index.d.ts +1 -1
  198. package/lib/security-rules/index.js +1 -1
  199. package/lib/security-rules/security-rules-api-client-internal.d.ts +1 -1
  200. package/lib/security-rules/security-rules-api-client-internal.js +1 -1
  201. package/lib/security-rules/security-rules-internal.d.ts +1 -1
  202. package/lib/security-rules/security-rules-internal.js +1 -1
  203. package/lib/security-rules/security-rules-namespace.d.ts +1 -1
  204. package/lib/security-rules/security-rules-namespace.js +1 -1
  205. package/lib/security-rules/security-rules.d.ts +1 -1
  206. package/lib/security-rules/security-rules.js +1 -1
  207. package/lib/storage/index.d.ts +1 -1
  208. package/lib/storage/index.js +1 -1
  209. package/lib/storage/storage-namespace.d.ts +1 -1
  210. package/lib/storage/storage-namespace.js +1 -1
  211. package/lib/storage/storage.d.ts +1 -1
  212. package/lib/storage/storage.js +1 -1
  213. package/lib/storage/utils.d.ts +1 -1
  214. package/lib/storage/utils.js +1 -1
  215. package/lib/utils/api-request.d.ts +1 -1
  216. package/lib/utils/api-request.js +1 -1
  217. package/lib/utils/crypto-signer.d.ts +1 -1
  218. package/lib/utils/crypto-signer.js +1 -1
  219. package/lib/utils/deep-copy.d.ts +1 -1
  220. package/lib/utils/deep-copy.js +1 -1
  221. package/lib/utils/error.d.ts +1 -1
  222. package/lib/utils/error.js +1 -1
  223. package/lib/utils/index.d.ts +1 -1
  224. package/lib/utils/index.js +1 -1
  225. package/lib/utils/jwt.d.ts +2 -1
  226. package/lib/utils/jwt.js +4 -3
  227. package/lib/utils/validator.d.ts +1 -1
  228. package/lib/utils/validator.js +1 -1
  229. package/package.json +10 -2
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * Copyright 2024 Google LLC
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * Copyright 2024 Google LLC
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google LLC
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * Copyright 2024 Google LLC
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * Copyright 2024 Google LLC
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google LLC
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * Copyright 2021 Google LLC
4
4
  *
@@ -381,6 +381,11 @@ export interface ExperimentValue {
381
381
  * served by the Experiment.
382
382
  */
383
383
  variantValue: ExperimentVariantValue[];
384
+ /**
385
+ * The percentage of users included in the Experiment, represented as a number
386
+ * between 0 and 100.
387
+ */
388
+ exposurePercent?: number;
384
389
  }
385
390
  /**
386
391
  * Interface representing a parameter value linked to a Rollout.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * Copyright 2021 Google LLC
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google LLC
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google LLC
@@ -187,6 +187,7 @@ class RemoteConfigTemplateImpl {
187
187
  else {
188
188
  this.parameters = {};
189
189
  }
190
+ validateAllParameterExposures(this.parameters);
190
191
  if (typeof config.parameterGroups !== 'undefined') {
191
192
  if (!validator.isNonNullObject(config.parameterGroups)) {
192
193
  throw new remote_config_api_client_internal_1.FirebaseRemoteConfigError('invalid-argument', 'Remote Config parameter groups must be a non-null object');
@@ -196,6 +197,11 @@ class RemoteConfigTemplateImpl {
196
197
  else {
197
198
  this.parameterGroups = {};
198
199
  }
200
+ for (const group of Object.values(this.parameterGroups)) {
201
+ if (validator.isNonNullObject(group) && validator.isNonNullObject(group.parameters)) {
202
+ validateAllParameterExposures(group.parameters);
203
+ }
204
+ }
199
205
  if (typeof config.conditions !== 'undefined') {
200
206
  if (!validator.isArray(config.conditions)) {
201
207
  throw new remote_config_api_client_internal_1.FirebaseRemoteConfigError('invalid-argument', 'Remote Config conditions must be an array');
@@ -358,6 +364,39 @@ class ServerConfigImpl {
358
364
  return { ...this.configValues };
359
365
  }
360
366
  }
367
+ function validateAllParameterExposures(parameters) {
368
+ // Walk each parameter and validate any exposurePercent present in
369
+ // conditional values only. Experiment exposure is condition-scoped.
370
+ for (const [parameterName, parameter] of Object.entries(parameters)) {
371
+ if (!validator.isNonNullObject(parameter)) {
372
+ continue;
373
+ }
374
+ if (!validator.isNonNullObject(parameter.conditionalValues)) {
375
+ continue;
376
+ }
377
+ for (const conditionalValue of Object.values(parameter.conditionalValues)) {
378
+ validateExperimentExposurePercent(conditionalValue, parameterName);
379
+ }
380
+ }
381
+ }
382
+ function validateExperimentExposurePercent(parameterValue, parameterName) {
383
+ // Only experiment-backed values can carry `exposurePercent`.
384
+ // For other parameter value types, this validator is a no-op.
385
+ if (!validator.isNonNullObject(parameterValue) ||
386
+ !validator.isNonNullObject(parameterValue.experimentValue)) {
387
+ return;
388
+ }
389
+ const exposurePercent = parameterValue.experimentValue.exposurePercent;
390
+ // `exposurePercent` is optional. If absent, leave behavior unchanged.
391
+ if (typeof exposurePercent === 'undefined') {
392
+ return;
393
+ }
394
+ // Enforce public contract: numeric and within [0, 100].
395
+ if (!validator.isNumber(exposurePercent) || !Number.isFinite(exposurePercent) ||
396
+ exposurePercent < 0 || exposurePercent > 100) {
397
+ throw new remote_config_api_client_internal_1.FirebaseRemoteConfigError('invalid-argument', `Experiment exposure percent must be between 0 and 100 (${parameterName})`);
398
+ }
399
+ }
361
400
  /**
362
401
  * Remote Config dataplane template data implementation.
363
402
  */
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google LLC
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * Copyright 2019 Google LLC
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2019 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * Copyright 2019 Google LLC
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2019 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * Copyright 2021 Google LLC
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * Copyright 2019 Google LLC
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2019 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * Copyright 2020 Google LLC
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2020 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * Copyright 2021 Google LLC
4
4
  *
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  import { File } from '@google-cloud/storage';
3
3
  export interface FirebaseMetadata {
4
4
  name: string;
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.getFirebaseMetadata = getFirebaseMetadata;
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2021 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * Copyright 2021 Google LLC
4
4
  *
@@ -17,6 +17,7 @@
17
17
  import * as jwt from 'jsonwebtoken';
18
18
  import { Agent } from 'http';
19
19
  export declare const ALGORITHM_RS256: jwt.Algorithm;
20
+ export declare const ALGORITHM_ES256: jwt.Algorithm;
20
21
  export type Dictionary = {
21
22
  [key: string]: any;
22
23
  };
package/lib/utils/jwt.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * Copyright 2021 Google LLC
@@ -16,7 +16,7 @@
16
16
  * limitations under the License.
17
17
  */
18
18
  Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.JwtErrorCode = exports.JwtError = exports.EmulatorSignatureVerifier = exports.PublicKeySignatureVerifier = exports.UrlKeyFetcher = exports.JwksFetcher = exports.ALGORITHM_RS256 = void 0;
19
+ exports.JwtErrorCode = exports.JwtError = exports.EmulatorSignatureVerifier = exports.PublicKeySignatureVerifier = exports.UrlKeyFetcher = exports.JwksFetcher = exports.ALGORITHM_ES256 = exports.ALGORITHM_RS256 = void 0;
20
20
  exports.verifyJwtSignature = verifyJwtSignature;
21
21
  exports.decodeJwt = decodeJwt;
22
22
  const validator = require("./validator");
@@ -24,6 +24,7 @@ const jwt = require("jsonwebtoken");
24
24
  const jwks = require("jwks-rsa");
25
25
  const api_request_1 = require("../utils/api-request");
26
26
  exports.ALGORITHM_RS256 = 'RS256';
27
+ exports.ALGORITHM_ES256 = 'ES256';
27
28
  // `jsonwebtoken` converts errors from the `getKey` callback to its own `JsonWebTokenError` type
28
29
  // and prefixes the error message with the following. Use the prefix to identify errors thrown
29
30
  // from the key provider callback.
@@ -170,7 +171,7 @@ class PublicKeySignatureVerifier {
170
171
  if (!validator.isString(token)) {
171
172
  return Promise.reject(new JwtError(JwtErrorCode.INVALID_ARGUMENT, 'The provided token must be a string.'));
172
173
  }
173
- return verifyJwtSignature(token, getKeyCallback(this.keyFetcher), { algorithms: [exports.ALGORITHM_RS256] })
174
+ return verifyJwtSignature(token, getKeyCallback(this.keyFetcher), { algorithms: [exports.ALGORITHM_RS256, exports.ALGORITHM_ES256] })
174
175
  .catch((error) => {
175
176
  if (error.code === JwtErrorCode.NO_KID_IN_HEADER) {
176
177
  // No kid in JWT header. Try with all the public keys.
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  /*!
3
3
  * @license
4
4
  * Copyright 2017 Google LLC
@@ -1,4 +1,4 @@
1
- /*! firebase-admin v13.7.0 */
1
+ /*! firebase-admin v13.9.0 */
2
2
  "use strict";
3
3
  /*!
4
4
  * @license
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "firebase-admin",
3
- "version": "13.7.0",
3
+ "version": "13.9.0",
4
4
  "description": "Firebase admin SDK for Node.js",
5
5
  "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",
6
6
  "license": "Apache-2.0",
@@ -73,6 +73,9 @@
73
73
  "auth": [
74
74
  "lib/auth"
75
75
  ],
76
+ "phone-number-verification": [
77
+ "lib/phone-number-verification"
78
+ ],
76
79
  "eventarc": [
77
80
  "lib/eventarc"
78
81
  ],
@@ -134,6 +137,11 @@
134
137
  "require": "./lib/auth/index.js",
135
138
  "import": "./lib/esm/auth/index.js"
136
139
  },
140
+ "./phone-number-verification": {
141
+ "types": "./lib/phone-number-verification/index.d.ts",
142
+ "require": "./lib/phone-number-verification/index.js",
143
+ "import": "./lib/esm/phone-number-verification/index.js"
144
+ },
137
145
  "./database": {
138
146
  "types": "./lib/database/index.d.ts",
139
147
  "require": "./lib/database/index.js",
@@ -214,7 +222,7 @@
214
222
  "google-auth-library": "^10.6.1",
215
223
  "jsonwebtoken": "^9.0.0",
216
224
  "jwks-rsa": "^3.1.0",
217
- "node-forge": "^1.3.1",
225
+ "node-forge": "^1.4.0",
218
226
  "uuid": "^11.0.2"
219
227
  },
220
228
  "optionalDependencies": {