Socket
Socket
Sign inDemoInstall

firebase-admin

Package Overview
Dependencies
204
Maintainers
5
Versions
131
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.11.0 to 9.11.1

2

lib/app-check/app-check-api-client-internal.js

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
/*!

@@ -3,0 +3,0 @@ * @license

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -84,12 +84,16 @@ /*!

/**
* Verifies a JWT auth token. Returns a Promise with the tokens claims. Rejects
* the promise if the token could not be verified. If checkRevoked is set to true,
* verifies if the session corresponding to the ID token was revoked. If the corresponding
* user's session was invalidated, an auth/id-token-revoked error is thrown. If not specified
* the check is not applied.
* Verifies a JWT auth token. Returns a promise with the token‘s claims.
* Rejects the promise if the token cannot be verified.
* If `checkRevoked` is set to true, first verifies whether the corresponding
* user is disabled.
* If yes, an `auth/user-disabled` error is thrown.
* If no, verifies if the session corresponding to the ID token was revoked.
* If the corresponding user's session was invalidated, an
* `auth/id-token-revoked` error is thrown.
* If not specified the check is not applied.
*
* @param {string} idToken The JWT to verify.
* @param {boolean=} checkRevoked Whether to check if the ID token is revoked.
* @return {Promise<DecodedIdToken>} A Promise that will be fulfilled after a successful
* verification.
* @return {Promise<DecodedIdToken>} A promise that will be fulfilled after
* a successful verification.
*/

@@ -104,3 +108,3 @@ BaseAuth.prototype.verifyIdToken = function (idToken, checkRevoked) {

if (checkRevoked || isEmulator) {
return _this.verifyDecodedJWTNotRevoked(decodedIdToken, error_1.AuthClientErrorCode.ID_TOKEN_REVOKED);
return _this.verifyDecodedJWTNotRevokedOrDisabled(decodedIdToken, error_1.AuthClientErrorCode.ID_TOKEN_REVOKED);
}

@@ -454,12 +458,18 @@ return decodedIdToken;

/**
* Verifies a Firebase session cookie. Returns a Promise with the tokens claims. Rejects
* the promise if the token could not be verified. If checkRevoked is set to true,
* verifies if the session corresponding to the session cookie was revoked. If the corresponding
* user's session was invalidated, an auth/session-cookie-revoked error is thrown. If not
* specified the check is not performed.
* Verifies a Firebase session cookie. Returns a promise with the token’s claims.
* Rejects the promise if the cookie could not be verified.
* If `checkRevoked` is set to true, first verifies whether the corresponding
* user is disabled:
* If yes, an `auth/user-disabled` error is thrown.
* If no, verifies if the session corresponding to the session cookie was
* revoked.
* If the corresponding user's session was invalidated, an
* `auth/session-cookie-revoked` error is thrown.
* If not specified the check is not performed.
*
* @param {string} sessionCookie The session cookie to verify.
* @param {boolean=} checkRevoked Whether to check if the session cookie is revoked.
* @return {Promise<DecodedIdToken>} A Promise that will be fulfilled after a successful
* verification.
* @param {boolean=} checkRevoked Whether to check if the session cookie is
* revoked.
* @return {Promise<DecodedIdToken>} A promise that will be fulfilled after
* a successful verification.
*/

@@ -472,5 +482,5 @@ BaseAuth.prototype.verifySessionCookie = function (sessionCookie, checkRevoked) {

.then(function (decodedIdToken) {
// Whether to check if the token was revoked.
// Whether to check if the cookie was revoked.
if (checkRevoked || isEmulator) {
return _this.verifyDecodedJWTNotRevoked(decodedIdToken, error_1.AuthClientErrorCode.SESSION_COOKIE_REVOKED);
return _this.verifyDecodedJWTNotRevokedOrDisabled(decodedIdToken, error_1.AuthClientErrorCode.SESSION_COOKIE_REVOKED);
}

@@ -658,4 +668,5 @@ return decodedIdToken;

/**
* Verifies the decoded Firebase issued JWT is not revoked. Returns a promise that resolves
* with the decoded claims on success. Rejects the promise with revocation error if revoked.
* Verifies the decoded Firebase issued JWT is not revoked or disabled. Returns a promise that
* resolves with the decoded claims on success. Rejects the promise with revocation error if revoked
* or user disabled.
*

@@ -665,9 +676,12 @@ * @param {DecodedIdToken} decodedIdToken The JWT's decoded claims.

* detection.
* @return {Promise<DecodedIdToken>} A Promise that will be fulfilled after a successful
* @return {Promise<DecodedIdToken>} A promise that will be fulfilled after a successful
* verification.
*/
BaseAuth.prototype.verifyDecodedJWTNotRevoked = function (decodedIdToken, revocationErrorInfo) {
BaseAuth.prototype.verifyDecodedJWTNotRevokedOrDisabled = function (decodedIdToken, revocationErrorInfo) {
// Get tokens valid after time for the corresponding user.
return this.getUser(decodedIdToken.sub)
.then(function (user) {
if (user.disabled) {
throw new error_1.FirebaseAuthError(error_1.AuthClientErrorCode.USER_DISABLED, 'The user record is disabled.');
}
// If no tokens valid after time available, token is not revoked.

@@ -709,6 +723,6 @@ if (user.tokensValidAfterTime) {

/**
* Verifies a JWT auth token. Returns a Promise with the tokens claims. Rejects
* Verifies a JWT auth token. Returns a promise with the tokens claims. Rejects
* the promise if the token could not be verified. If checkRevoked is set to true,
* verifies if the session corresponding to the ID token was revoked. If the corresponding
* user's session was invalidated, an auth/id-token-revoked error is thrown. If not specified
* user's session was invalidated, an `auth/id-token-revoked` error is thrown. If not specified
* the check is not applied.

@@ -718,3 +732,3 @@ *

* @param {boolean=} checkRevoked Whether to check if the ID token is revoked.
* @return {Promise<DecodedIdToken>} A Promise that will be fulfilled after a successful
* @return {Promise<DecodedIdToken>} A promise that will be fulfilled after a successful
* verification.

@@ -762,6 +776,6 @@ */

/**
* Verifies a Firebase session cookie. Returns a Promise with the tokens claims. Rejects
* Verifies a Firebase session cookie. Returns a promise with the tokens claims. Rejects
* the promise if the token could not be verified. If checkRevoked is set to true,
* verifies if the session corresponding to the session cookie was revoked. If the corresponding
* user's session was invalidated, an auth/session-cookie-revoked error is thrown. If not
* user's session was invalidated, an `auth/session-cookie-revoked` error is thrown. If not
* specified the check is not performed.

@@ -771,3 +785,3 @@ *

* @param {boolean=} checkRevoked Whether to check if the session cookie is revoked.
* @return {Promise<DecodedIdToken>} A Promise that will be fulfilled after a successful
* @return {Promise<DecodedIdToken>} A promise that will be fulfilled after a successful
* verification.

@@ -774,0 +788,0 @@ */

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2020 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2020 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2020 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2020 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2020 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
/*!

@@ -3,0 +3,0 @@ * @license

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2021 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2020 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2020 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2020 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2020 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2020 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2020 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
/*!

@@ -3,0 +3,0 @@ * Copyright 2020 Google Inc.

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -741,2 +741,6 @@ /*!

};
AuthClientErrorCode.USER_DISABLED = {
code: 'user-disabled',
message: 'The user record is disabled.',
};
AuthClientErrorCode.USER_NOT_DISABLED = {

@@ -743,0 +747,0 @@ code: 'user-not-disabled',

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

@@ -1,2 +0,2 @@

/*! firebase-admin v9.11.0 */
/*! firebase-admin v9.11.1 */
"use strict";

@@ -3,0 +3,0 @@ /*!

{
"name": "firebase-admin",
"version": "9.11.0",
"version": "9.11.1",
"description": "Firebase admin SDK for Node.js",

@@ -76,3 +76,3 @@ "author": "Firebase <firebase-support@google.com> (https://firebase.google.com/)",

"@microsoft/api-extractor": "^7.11.2",
"@types/bcrypt": "^2.0.0",
"@types/bcrypt": "^5.0.0",
"@types/chai": "^4.0.0",

@@ -118,3 +118,3 @@ "@types/chai-as-promised": "^7.1.0",

"sinon-chai": "^3.0.0",
"ts-node": "^9.0.0",
"ts-node": "^10.2.0",
"typedoc": "^0.19.2",

@@ -121,0 +121,0 @@ "typescript": "^3.7.3",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc