@google-cloud/firestore
Advanced tools
Comparing version 3.8.1 to 3.8.2
@@ -293,4 +293,2 @@ "use strict"; | ||
delete emulatorSettings.apiEndpoint; | ||
// Manually merge the Authorization header to preserve user-provided headers | ||
emulatorSettings.customHeaders = Object.assign({}, emulatorSettings.customHeaders, { Authorization: 'Bearer owner' }); | ||
this.validateAndApplySettings(emulatorSettings); | ||
@@ -328,3 +326,8 @@ } | ||
const sslCreds = grpc.credentials.createInsecure(); | ||
client = new module.exports.v1(Object.assign({ sslCreds }, this._settings)); | ||
// Use user-provided headers, but provide an Authorization header by default | ||
// so that connection is recognized as admin in Firestore Emulator. (If for | ||
// some reason we're not connecting to the emulator, then this will result in | ||
// denials with invalid token, rather than behave like clients not logged in.) | ||
const customHeaders = Object.assign({ Authorization: 'Bearer owner' }, this._settings.customHeaders); | ||
client = new module.exports.v1(Object.assign(Object.assign({ sslCreds }, this._settings), { customHeaders })); | ||
} | ||
@@ -331,0 +334,0 @@ else { |
@@ -7,2 +7,9 @@ # Changelog | ||
### [3.8.2](https://www.github.com/googleapis/nodejs-firestore/compare/v3.8.1...v3.8.2) (2020-05-30) | ||
### Bug Fixes | ||
* authenticate as admin user when ssl:false is set ([#1095](https://www.github.com/googleapis/nodejs-firestore/issues/1095)) ([a178556](https://www.github.com/googleapis/nodejs-firestore/commit/a17855634542bce798f1ffe50d72775647990616)), closes [/github.com/firebase/firebase-js-sdk/issues/3105#issuecomment-635541894](https://www.github.com/googleapis//github.com/firebase/firebase-js-sdk/issues/3105/issues/issuecomment-635541894) | ||
### [3.8.1](https://www.github.com/googleapis/nodejs-firestore/compare/v3.8.0...v3.8.1) (2020-05-27) | ||
@@ -9,0 +16,0 @@ |
{ | ||
"name": "@google-cloud/firestore", | ||
"description": "Firestore Client Library for Node.js", | ||
"version": "3.8.1", | ||
"version": "3.8.2", | ||
"license": "Apache-2.0", | ||
@@ -6,0 +6,0 @@ "author": "Google Inc.", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2525133
51794