Skip to content

Commit

Permalink
fix: do not leak credentials in Firestore.toJSON() (#1522)
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidt-sebastian committed May 27, 2021
1 parent 8da2a8c commit 791310f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions dev/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,16 @@ export class Firestore implements firestore.Firestore {
return this._clientPool.terminate();
}

/**
* Returns the Project ID to serve as the JSON representation of this
* Firestore instance.
*
* @return An object that contains the project ID (or `undefined` if not yet
* available).
*/
toJSON(): object {
return {projectId: this._projectId};
}
/**
* Initializes the client if it is not already initialized. All methods in the
* SDK can be used after this method completes.
Expand Down

0 comments on commit 791310f

Please sign in to comment.